CFG2 1.2.041 Apr 10 2002 Parameters are '-F' to specify the source file name, '-P' to specify a path that will be placed in front of *all* file names, '-V' to toggle verbose mode and '-H' to get this help text. Version-dependant debugging actions can be invoked by using '-D'. The program can be made to dump source lines as they are read in. To do this, use '-T'. The current 'special' word set is: #IF Starts the conditional construct. #ELSE Begins second part of conditional. #ENDIF Terminates a conditional. #FILE Declares an output file. #DATA Declares an input raw data file. #READ Reads a raw data file. #SOURCE Declares a source file. #INCLUD Includes a source file. #CLOSE Closes the specified file. #DELETE Deletes the required file. #RUN Executes the given command line. #RDRUN Executes command capturing stdout. #SWITCH [] Defines a simple or derived switch. #CONFIG Creates a 'configuration' switch. #DEFINE Creates a macro definition. #REDEF Alters a macro definition. #SET The named tags are set as required. #SHOW Show the current switch status. #DUMP Diagnostic switch and file tag dump. #ERROR Allows the generation of error messages. #SAY Allows the generation of user messages. #SEND Nominates the destination output file(s). #MARGIN Sets width of line expression area. #TAB Tabs are expanded to specified width. #EMPTY Passes empty lines unchanged if true. Other than when being *defined*, file name tags can be 'wild-carded'. For example, something like '#DELETE TEMP*' can be used to delete all files that start with 'TEMP'. (The '?' character matches any single character while the '*' character matches zero or more characters.) Operators are '&', '|', '^' and '!' which correspond to 'and', 'or', 'xor' and 'not' respectively. The 'same as last line character is '='. The comment' character is ';'. The tag and environment variable expansion char is '%', while the 'generate an empty line' character is '_'. The new-line that is normally appended to each output line in a file can be inhibited by using '_' as the last character on the line concerned. (This action can be inhibited by using *two* '_' characters together.) The special configuration switch 'ALWAYS' will be executed on *every* run whereas 'DEFAULT' will only be invoked if no switches are specified on the command-line. The special 'is only one switch set?' operator is 'JUSTONE'. The program has an 'text expansion' facility. For example, using '%CFG2PROGNAME%' will generate the program name and version number, '%CFG2PARAMS%' will produce the list of parameters used and '%CFG2SWITCHES%' will expand to the current switch state. Using '%CFG2SOURCE%' will give you the name of the current source file. The date and time can be output by using '%CFG2DATIM%', which produces the current date and time in a plain text format. If you want *numeric* dates and times, you can use '%CFG2DATE%' or '%CFG2TIME%', respectively. A file tag name, switch tag name or operating system evironment can all be expanded in the same way - they expand to the 'real' file name, the switch 'value' and the variable value, respectively. A tag can be a maximum of 32 characters long and each input line can be 512 characters at most. The expression stack has enough room for 16 entries. The default margin width is 8 with tabs being expanded to every 8 columns. Verbose defaults 'off'. The passing of empty lines defaults 'off'. This program is a ChAoS utility - please visit www.glod.net.