Hello,
just to let you know about some recent additions regarding the config file preprocessor, hopefully they will help you keep the config cleaner and easy to maintain.
- you can use either #! or !! as the start marker of preprocessor directive (to make happy those complaining about not able to distinguish quickly from comments) - subsdef was added some time ago to allow defining a token that will replace ID tokens as well as update inside string values. It has the same format as #!subst. For example:|
#!substdef "!ABC!XYZ!g"|
is pretty much same as:
#!define ABC XYZ #!subs "/ABC/XYZ/"
- substdefs, like substdef byt the defined value will be added enclosed in double quotes:
|#!substdef "!ABC!XYZ!g"|
is pretty much same as:
#!define ABC "XYZ" #!subs "/ABC/XYZ/"
- trydef - similar to define, but if the ID is defined already, ignore this time - redef - similar to define, but if the ID is defined, redefine its value (note that define itself throws error if the ID is already defined)
Regarding the inclusion of files, a new option is available, 'import_file'. It is similar to 'include_file', but if the file is not found, it does not throw error. Bot include_file and import_file can be started as well with #! or !!. You can still use them without #! or !!, whatever you like more.
Cheers, Daniel