Next: Recognition   Previous: Basic definition   Contents: Contents

Option defaults

If an option is declared but unused, it defaults to an empty string unless the definition declared a default value itself by using an assignment list after the macro name.


  +MACRO{value="default value"}:value is __value__

Please note that the default assignment uses the real option name, no placeholder.

As long as the option is set in the macro call, the passed value will be used:


  Now I'm using the macro the usual way, MACRO{value=passed}.

But if the option is omitted, PerlPoint falls back to the stored default value:


  Using this macro the convenient way: MACRO.

Default assignment lists are syntactically similar to the ones used in tag and macro calls, so it is possible to make various settings.


  +MACRO{a=1 b=2 c=3}:sum(__a__, __b__, __c__)

Setting a default value for an option not declared in the macros replacement text takes no effect and is silently ignored.

Next: Recognition   Previous: Basic definition   Contents: Contents