Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

28 Working with macros > 28.5 Accessing settings with configuration macros > 28.5.2 Determining the value of a configuration variable


28.5.2 Determining the value of a configuration variable

The value of a configuration variable depends on whether the referenced setting is present and valid:

For present settings, value is the latest override (if any)

For missing settings, value is the default

For invalid settings, value is zero

For present settings, value is the latest override (if any)

The value of a configuration variable is the value of the setting in question at the time a macro is executed. If the original setting in your configuration file was overridden by a configuration-variable assignment in a marker or another macro, the override, not the original value, is the value returned for <$$[section]key>. See §33.2 Overriding settings with markers or macros.

For missing settings, value is the default

If you use a configuration variable to retrieve the value of a setting when the key is not present in your configuration file, or the section itself is missing from your configuration file, the value of <$$[section]key> is the default value specified for that key.

In some cases the default value is an empty string, as for a missing [Style*Prefix] or [Style*Suffix] setting.

For invalid settings, value is zero

If you use a configuration variable to retrieve a value when <$$[section]key> refers to an invalid configuration-file section, or to an invalid key, Mif2Go returns 0 (zero), which is interpreted as false in a conditional expression <$_if($$[section]key ...)>; see §28.6.4.2 Using conditional expressions.



28 Working with macros > 28.5 Accessing settings with configuration macros > 28.5.2 Determining the value of a configuration variable