/
Group HSL statements for scope control
Group HSL statements for scope control
You can control the scope of script execution by grouping statements into a block. The contents of a group cannot be referenced outside of the block.
Grouping commands is useful if you want to:
- Use a single statement to execute a group of statements in the desired order
- Create script modularity
- Define the visibility of local variables
You group statements by declaring a block within braces ({}):
if (test condition) { statement_1; statement_2; } |
For example:
if ( 2 < 3 ) { string $blah = "This worked"; print ($blah); }
Grouping examples
This example groups the statement to be executed for an IF conditional statement:
float $MasterControl = 1; float $MarkerControl = 1; if ($MasterControl == 1 || $MarkerControl == 1) { select LFWT; findTail 2; cutKeys; print ("Operation was run."); }
, multiple selections available,
Related content
Group HSL statements for scope control
Group HSL statements for scope control
More like this
Control the flow of HSL scripts
Control the flow of HSL scripts
More like this
Work with variables in HSL scripts
Work with variables in HSL scripts
More like this
Use the Shogun Post Script Editor
Use the Shogun Post Script Editor
More like this
Work with HSL return values
Work with HSL return values
More like this
Call HSL scripts
Call HSL scripts
More like this