<< logicalflagexpression << | Table Of Contents | >> managers >> |
Keyword | macro |
Purpose | Defines a text fragment that can later be inserted by using the specified ID. To insert the text fragment anywhere in the text you need to write ${ID}.The body is not optional. It must be enclosed in square brackets. Macros can be declared like this: macro FOO [ This text ] If later Macros may have arguments. Arguments are accessed with special macros with numbers as names. The number specifies the index of the argument. macro FOO [ This ${1} text ] will expand to User defined macro IDs should start with one uppercase letter as all lowercase letter IDs are reserved for built-in macros. To terminate the macro definition, the In macro calls the macro names can be prefixed by a question mark. In this case the macro will expand to nothing if the macro is not defined. Otherwise the undefined macro would be flagged with an error message. The macro call ${?foo} will expand to nothing if foo is undefined. |
|
Syntax | macro <ID> <MACRO> |
|
Arguments | none | |
Context | properties |
project "Example Project" 2008-01-18 +2m { timezone "America/Denver" } macro allocateGroup [ allocate tux1, tux2 ] resource tux1 "Tux1" resource tux2 "Tux2" task t1 "Task1" { start ${projectstart} # built-in macro } task t2 "Task2" { depends !t1 effort 20d ${allocateGroup} }
<< logicalflagexpression << | Table Of Contents | >> managers >> |