This version is out of date, covering development from v4.6.0 to v4.7.1. It is maintained here only for inbound reference links from elsewhere. Jump to the current version of aTbRef. |
|
A Tinderbox Reference File : Actions & Rules : Operators : Action Operator Scope : Item-based operators : do(macro[,args]) | aTbRef Site Map |
do(macro[,args]) |
Operator Type: | Data manipulation |
Operator Scope of Action: | Item |
The do() operator do lets rules and actions use macros.
do(macro[,arg1,arg2,arg3] )
The first argument is the name of the macro. Subsequent arguments are optional and are passed to the macro, which can refer to them as $1, $2, $3, and so forth.
After the macro is evaluated, its result is returned and is parsed again as a rule, action, or expression. For example:
$Name=do(computeName,$Name,$Name(parent))
sets name to the result of a macro called computeName.
do(Instructions);
simply executes whatever actions are returned by a macro called Instructions Instructions.
Note that up until v4.6 macros could also be used in agent queries; this is no longer supported.
Up: Item-based operators | |
Previous: descendedFrom(item) | Next: escapeHTML(data) |
Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
[See aTbRef CC licence Attribution/Waiver info info]