Home
About
Policies
FAQ
Forums
Registration
Password Recovery

Macros (MPI)

From Tapestries MUCK

Jump to: navigation, search

macros

If the MPI interpreter comes across a function name that it does not recognize, it will look in the _msgmacs/ propdirs down the environment from the trigger object, for a property with the name of the function.

If it does find it there, then it takes the value of that property, and substitutes it in for the function as a macro. The arguments to the function replace the {:1} through {:9} markers in the macro definition.

For example, if there were a property set on #0, defined as:

_msgmacs/div_rand:{add:{div:{:2},10},{dice:{:1}}}

And you had some MPI code that looked like:

{div_rand:22,160}

Then the macro would expand out to:

{add:{div:160,10},{dice:22}}

After the macro argment substitution is complete, it is then evaluated.

Personal tools
Namespaces
Variants
Actions
navagation
information
wiki
Toolbox