You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Anatolii Kmetiuk edited this page Oct 15, 2015
·
2 revisions
General Structure
A SubScript script is used in an ordinary method position and takes the following form:
script name(parameter_list) = expression
script is a keyword that declares a script. name is the name of the script. Optionally, you can include parentheses with the parameter list after the script name, just like you do for an ordinary method.
expression is a SubScript expression that has the following form:
That is, it is just a sequence of one or more operand delimited by the operators.
An operand is an atomic action or a script that describes an action to be taken. An operator defines how this operand combines with other operands.
Operands
Code Fragments
Code fragments are operands that execute pure Scala code in SubScript context.
Name
Syntax
Meaning
Normal
{!code!}
Will be executed without any special effects
Threaded
{*code*}
Will be executed from another thread
Tiny
{:code:}
Will be executed during the activation
Event handling
{.code.}
Can only be executed manually
Event handling loop
{...code...}
Same as event handling, but won't deactivate on completion