Changes

584 bytes added ,  20:23, 29 March 2023
Line 14: Line 14:     
== Kinds of variables used ==
 
== Kinds of variables used ==
 +
 +
Action blocks work with their own set of variables (plus Global ones if necessary) whose values can be passed from/to the calling macro.
    
Three kinds of variables can be used inside an action block: Input, Output and Working ones. Each one can be of any type (boolean, integer, decimal, string, array/dictionary).
 
Three kinds of variables can be used inside an action block: Input, Output and Working ones. Each one can be of any type (boolean, integer, decimal, string, array/dictionary).
Line 20: Line 22:     
Working variables are used to make all kinds of calculations/comparisons inside the action block, like any variable according to its type. The only difference with Input and Output ones is that they <b>do not appear</b> in the variables list when configuring the call, as they are not useful to the calling macro.
 
Working variables are used to make all kinds of calculations/comparisons inside the action block, like any variable according to its type. The only difference with Input and Output ones is that they <b>do not appear</b> in the variables list when configuring the call, as they are not useful to the calling macro.
 +
{|border="1" cellpadding="2"
 +
|+Schematic way variables interact between Macros and Action blocks
 +
!width="10"|Step #
 +
!width="150"|Where from
 +
!width="150"|Kind of variable
 +
!width="400"|When
 +
|-
 +
|1
 +
|Macro
 +
|rowspan="2"|Local<br/>Input
 +
|rowspan="2"|Call configuration time
 +
|-
 +
|rowspan="3"|2
 +
|rowspan="3"|Action block
 +
|-
 +
|Input<br/>Working<br/>Output
 +
|Action block process
 +
|-
 +
|rowspan="2"|Output<br/>Local
 +
|rowspan="2"|Call configuration time
 +
|-
 +
|3
 +
|Macro
 +
|}
    
== Input and Output Parameters ==
 
== Input and Output Parameters ==
Line 32: Line 58:     
== Differences between an action block and a macro?==
 
== Differences between an action block and a macro?==
A quick explanation might be: Macros are programs, action blocks are functions.
+
A quick explanation might be: Macros are programs, Action blocks are functions.
But below is a table that better describes the differences.
+
Below is a table that better describes the main differences.
    
{| border="1" cellpadding="2"
 
{| border="1" cellpadding="2"
!width="200"|
+
!width="500"|Capabilities
!width="100"|A Macro
+
!width="80"|Macros
!width="150"|An Action Block
+
!width="80"|Action blocks
 
|-
 
|-
|Has a disabling switch?
+
|Has a disabling switch
 
|Yes
 
|Yes
 
|No
 
|No
 
|-
 
|-
|Can be categorized?
+
|Can be categorized
 
|Yes
 
|Yes
 
|No
 
|No
 
|-
 
|-
|Has a trigger component?
+
|Has a trigger component
 
|Yes
 
|Yes
 
|No
 
|No
 
|-
 
|-
|Triggers can be constrained individually?
+
|Triggers can be constrained individually
 
|Yes
 
|Yes
|Triggers not available
+
|N/A
 
|-
 
|-
|Has an action set component?
+
|Has an action set component
 
|Yes
 
|Yes
 
|Yes
 
|Yes
 
|-
 
|-
|Actions can include “Wait For Trigger?”
+
|Actions can include “Wait For Trigger"
|Yes
   
|Yes
 
|Yes
 +
|No
 
|-
 
|-
|Actions can be grouped into condition sets?
+
|Actions can be grouped into condition sets
 
|Yes
 
|Yes
 
|Yes
 
|Yes
 
|-
 
|-
|Actions can be constrained individually?
+
|Actions can be constrained individually
 
|Yes
 
|Yes
 
|Yes
 
|Yes
 
|-
 
|-
|Has a constraint set component to apply to all actions?
+
|Has a constraint set component applied to all actions
 
|Yes
 
|Yes
 
|No
 
|No
 
|-
 
|-
|Can read & edit global variables?
+
|Can create, read & update global variables
 
|Yes
 
|Yes
 
|Yes
 
|Yes
 
|-
 
|-
|Can include local variables?
+
|Can create, read & update calling macro's local variables
|Yes
+
|N/A
 
|No
 
|No
 
|-
 
|-
|Can include input variables?
+
|Can include Input variables
 
|No
 
|No
 
|Yes
 
|Yes
 
|-
 
|-
|Can include those new “working variables?”
+
|Can include Working variables
 
|No
 
|No
 
|Yes
 
|Yes
 
|-
 
|-
|Can include output variables?
+
|Can include Output variables
 
|No
 
|No
 
|Yes
 
|Yes
 
|-
 
|-
 
|}
 
|}
editors
59

edits