![]() | ![]() | ![]() | ![]() | ![]() |
Macro Parameters without values (Keyword) |
The subject of macros is reasonably complex (but well worth learning) please ensure you have at least read the macro introduction before reading this section.
A macro reference would normally specify values for all parameters it uses, however there are times when this is not required. PPWIZARD does not require you to set a value, if you don't supply one then the name of the parameter in upper case is used.
The definition of the macro would supply a default value in case the parameter (keyword) was not used and would normally do some conditional generation (using #if etc).
You may wish to have a look at the rules that apply to positional parameters as these are used as a way of telling Keyword and positional parameters apart!
The following example shows a simple macro with very little validation that simply assumes if the "keyword" "start" was not supplied that the "end" condition is required:
;--- Define the macro --- #define StupidMacro \ #if '{$START=""}' = 'START' \ start stuff \ #elseif \ end stuff \ #endif ;--- Use the macro --- <$StupidMacro start> ;;Start stuff <$StupidMacro> ;;End
![]() | ![]() | ![]() | ![]() | ![]() |