config( <string> {,<num>} )
string
The string value from the System Configuration File (or program parameter) corresponding to a key supplied by the caller. The format of a line in the configuration file is:
<key> <value>
Example:
name1 Fred
The configuration file is named fire.ini.
If the key was used as a program parameter switch, then its value will be returned to the config function in preference to that from the configuration file,
Example:
fire -name1=Fred
<string>
The key to be looked up. Character matching
is case-insensitive.
<num>
Whether an exact name
match is necessary. If this value is 0, then if <string> matches the leading
part of a config file entry or program parameter keyword, the function
will be successful. If this value is 1, then <string> must match a keyword
exactly. The default value for <num>
is 0.
config("name1") - Might yield 'Fred'
config("nam") - would yield 'Fred'
config("nam",1) - would fail
A successful execution of this function will return the value associated with the keyword. For an entry in the config file, the return value is whatever follows the the keyword on the config file line, which may be an empty string. For a program parameter, if the keyword has no accompanying value, e.g. -g rather than -g=<value>, then the string value "1" is returned, or "0" if the keyword was of the form -no_<keyword>, e.g. -no_g. This enables boolean values to be provided as command line parameters.
An unsuccessful execution of the function will return an empty string and set the value of funcerr to -1.
The following might yield 'Fred'.
string cs = config("name1")