With the module initfile a program can read an integer number, floating number or a character string from an initialisation file. Each line in this file is composed by a name (called key), an equal sign and the value. For example:
When the program search for example the key “runtype”, it gets the integer 2. If a key is
present several times in the same initialisation file, then the last value found is taken.
The key can be composed by any alphanumeric character and by periods (.). In particular,
spaces and a equal signs are not allowed within the key name. The wild cards symbols *, ?
and brackets ([,]), are allowed but have a special meaning (see Paragraph below).
Vectors of integers, floats and character strings are also supported. The values are separated with commas and enclosed in brackets.
Blank lines are ignored and comments begin with the pound sign (#). It is recommended to
document the meaning and the possible values by a comments directly in the initialisation file.
Entries in this files cannot be split across different lines. Before assigning a value to a key you
should know with type is expected: scalar or vector and number or characters. If the type does
not correspond, the program will be stopped.
Sometimes a sequence of keys are attributed to the same values:
In this case one can use wild cards and write the following:
The meaning of the wild cards are the same as for file name generation of the Burne Shell (see also man page of sh and gmatch).