wesnoth-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Wesnoth-dev] Adding arithmetic operations to WML


From: Joseph Simmons
Subject: Re: [Wesnoth-dev] Adding arithmetic operations to WML
Date: Fri, 18 Feb 2005 17:22:38 -0600
User-agent: Debian Thunderbird 1.0 (X11/20050116)

{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

[Prev in Thread] Current Thread [Next in Thread]