Calling macros: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 1: | Line 1: | ||
[[Category:Tutorial]] | [[Category:Tutorial]] | ||
{{stub}} | |||
= Calling macros from a macro = | = Calling macros from a macro = | ||
Sometimes you want to call a macro from a macro. When you are a coder you want this really often. | Sometimes you want to call a macro from a macro. When you are a coder you want this really often. | ||
It enables you to split your code in small, simple chunks and reuses it over and over again. | It enables you to split your code in small, simple chunks and reuses it over and over again. | ||
This is a handy technique to keep stack size requirement low and to get rid of large code-level-nesting. | This is a handy technique to keep stack size requirement low and to get rid of large code-level-nesting. | ||
There are four ways to do so. | There are four ways to do so. |
Revision as of 06:50, 23 June 2012
This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.
Calling macros from a macro
Sometimes you want to call a macro from a macro. When you are a coder you want this really often. It enables you to split your code in small, simple chunks and reuses it over and over again.
This is a handy technique to keep stack size requirement low and to get rid of large code-level-nesting.
There are four ways to do so.
The macro roll option
See also [macro():], macro.return, macro.args.
User Define Function
See also Library Token, onCampaignLoad and defineFunction() (and arg(), argCount()).
Macro Links
See also macroLink(), macroLinkText().
Evaluate A Macro
See also evalMacro(), execMacro()