Having support for the '%' operator makes it easier to implement
even/odd version checks, like:
enable_debug = get_option('enable-debug')
if enable_debug == 'auto'
if minor_version % 2 == 0
enable_debug = 'minimum'
else
enable_debug = 'yes'
endif
endif
which would be impossible without resorting to less obvious long-hand
forms like:
a - (b * (a / b))
bool to_int() will return 0 or 1, useful if one wants to set
a define to 0 or 1 based on a boolean result instead of having
it just defined or undefined.
bool to_string() will return 'true' or 'false' by default same
as when using it to format a string, but with the additional
possibility to specify two extra string arguments to be returned
as true/false values, e.g. to_string('yes', 'no'). This can be
useful when outputting messages to be shown to the user.
Addition (+), subtraction (-), multiplication (*) and division (/) for numbers
follows the BIDMAS rules.
Strings and arrays can be concatenated with the addition operator
Strings can be concatenated with numbers with the addition operator