This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
action:Execute_a_Subroutine [2021/10/08 01:58] peternlewis created |
action:Execute_a_Subroutine [2022/09/27 01:20] peternlewis [Execute a Subroutine Action] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Execute a Subroutine ====== | + | ====== Execute a Subroutine Action ====== |
- | + | The *Execute a Subroutine* action (v10.0+) allows you to execute another macro like a [[/Subroutines|subroutine]], optionally passing parameters in and receiving a result in return. The sub-macro will be executed, and when it is finished, execution will continue on from after this action. | |
- | The *Execute a Subroutine* action allows you to execute another macro like a subroutine, optionally passing parameters in and receiving a result in return. The sub-macro will be executed, and when it is finished, execution will continue on from after this action. | + | |
The target macro defines the parameters via the [[trigger:Subroutine|Subroutine]] trigger, and you specify the values for those parameters in this action. | The target macro defines the parameters via the [[trigger:Subroutine|Subroutine]] trigger, and you specify the values for those parameters in this action. | ||
- | If the macro returns a value, then you can also | + | You can only use this action to execute sub-macros that include the [[trigger:Subroutine|Subroutine]] trigger, but if you want to execute another macro without parameters or a result you can use the [[action:Execute_a_Macro|Execute a Macro]] action instead. |
+ | |||
+ | If the macro returns a value, then you can use the [[action:Return_from_Subroutine|Return from Subroutine]] action to return a value which will be stored in the specified variable. | ||
ExtraSearchTags: *Run Macro*, *Run a Macro*, *Call Macro*, *Sub Macro* | ExtraSearchTags: *Run Macro*, *Run a Macro*, *Call Macro*, *Sub Macro* | ||
Line 20: | Line 21: | ||
=== Actions === | === Actions === | ||
- | * [[action:Execute_a_Subroutine|Execute a Subroutine]] action | + | * [[action:Return_from_Subroutine|Return from Subroutine]] action |
* [[action:Execute_a_Macro|Execute a Macro]] action | * [[action:Execute_a_Macro|Execute a Macro]] action | ||
* [[/Actions|Actions]] | * [[/Actions|Actions]] |