clcms 0.6 documentation

About clcms Overview Content Tree Macros
Arguments Defining Macros Default Macros
PageNav:
Next: Defining Macros
Up: Macros
Prev: Macros
To Project Page
Last updated:
2007-02-10

Arguments

If you want to pass arguments to your macro, you can do that by calling it with _<name>_<arg1>_<arg2>_<etc>_

You can use parentheses () around each argument if it contains any characters not in [a-zA-Z0-9]: _<name>_(a b _d fg)_ will evaluate in the macro <name> with 1 argument "a b _d fg".

In the .macro file, these arguments are passed as the list called arguments. The first argument can be retrieved with arguments[0] and so on. Be careful not to pass too few values, for it will result in an error and stack dump. It is prudent to check the arguments array in your macro's.