New in version 3.25.
Evaluate a group of commands with a dedicated variable and/or policy scope.
block([SCOPE_FOR [POLICIES] [VARIABLES] ] [PROPAGATE <var-name>...]) <commands> endblock()
All commands between
block() and the matching
recorded without being invoked. Once the
endblock() is evaluated, the
recorded list of commands is invoked inside the requested scopes, then the
scopes created by the
block() command are removed.
Specify which scopes must be created.
Create a new variable scope.
SCOPE_FORis not specified, this is equivalent to:
block(SCOPE_FOR VARIABLES POLICIES)
When a variable scope is created by the
block()command, this option sets or unsets the specified variables in the parent scope. This is equivalent to
set(var1 "INIT1") set(var2 "INIT2") block(PROPAGATE var1 var2) set(var1 "VALUE1") unset(var2) endblock() # Now var1 holds VALUE1, and var2 is unset
This option is only allowed when a variable scope is created. An error will be raised in the other cases.
while(TRUE) block() ... # the break() command will terminate the while() command break() endblock() endwhile()