{VARIABLE_OP } fufills this function, i believe. It is used like this:

{VARIABLE_OP EXPY add -1}

where EXPY is the variable being added to, add is the function being performed (it can also multiply, IIRC),
and -1 is the amount being added.

they don't take any number of arguments, but IMHO they make it unnecessary to add a predefined
preprocessor macro.

Yann Dirson wrote:

I've not found in the WML-ref section of the wiki anything about
existing arithmetic operations in WML.

If that does not exist yet, I suggest we add predefined preprocessor
macro "+" and maybe "*".  They shall surely take any number of
arguments, and issue a warning if any component of the operation
cannot be parsed as a number in its entirety (ie. if there are any
non-whitespace trailing non-digits).

Any objection ?


Reply via email to