// This is zk.ini, the user-modifiable initialization file for zk. // You are assumed to already be an experienced C++ programmer. These // comments and the documentation don't give you any C++ help, just // help with zk. The C++ language is extended by adding a few minor // features, such as new kinds of macros. See extend.txt for details. // You can put C++ statements in this file, and they will be // executed at startup. Header files are usually not needed, // because common definitions are provided by precompiled headers // supplied by the background fast-initialization process. // You can however use your own header files when you need them, // the normal way. // C++ statements you put in this file or on the command line are // executed immediately if they are normal C++ executable statements. // There is no main(), you just input the C++ statements at the // command line prompt or in zk.ini (this file), or if you have the // pro version, you can use other input, such as zkbat script files, // which can be executed from the operating system command line // without invoking zk first, and which are explained in scripts.txt. // While executable C++ statements are executed immediately, other // kinds of statements, such as function declarations, etc., are // stored and made available for your code to use, just as if you had // compiled them. // In general, you can input anything at the zk command line you can // put in zk.ini, and vice versa. One minor difference is that some // commands which don't require a semicolon on the command line do // require one in zk.ini. Those are the commands that take an unknown // number of arguments, and any operating system commands defined by // the cmds macro. // The following defines the zk command, which you can use to reload // zk.ini after modifying it, without exiting from zk. To use it, just // type zk at the zk command line. It calls ldini(), which is a // compiled function. The definitions you entered at the command line // will still be there unless new definitions in zk.ini override them. // Note that zk is an m1 macro, which is one of the new kinds of macros // explained in extend.txt. // Don't confuse this zk command with the one you type at the operating // system command line to invoke zk. The effects are similar but this // one invokes a macro and that one invokes zk.exe. You can change this // to some other name than zk if you prefer. #m1 zk ldini(); % // The following defines zi as a command to edit zk.ini, but since you // will be using your own editor, you need to change "vi" to the name // of your editor. #m1 zi sys vi zk.ini; % // The following defines some operating system shell commands, so // you can use these commands at the zk command line prompt. You // can add other commands you want to use. You should also change // "vi" to the name of your editor. You can use the cmds macro as // many times as you want, to keep adding more commands. For more // information about the cmds macro, see extend.txt. cmds dir cls vi copy xcopy; // The following define qq, to quit, and sh, to shell out to cmd.exe, // which is the command shell that comes with NT. When you quit, you // can start fresh by invoking zk again. When you shell out, you // return to the original zk session by using the exit command. #m1 qq exitfrominterp(); % #m1 sh sys cmd; % // Here we clear the screen and display zk's version message. // The cls command does not need a semicolon when typed at the // command line, but it does need one here in zk.ini, for reasons // explained in extend.txt. cls; version(); // The following defines the hi command, used in the message below. // See library.txt for an explanation of the msg and gsm macros. // We could use cout<