-
Notifications
You must be signed in to change notification settings - Fork 2
Syntax Documentation
Anatolii Kmetiuk edited this page Oct 15, 2015
·
2 revisions
A SubScript script is used in an ordinary method position and takes the following form:
script name(parameter_list) = expressionscript 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:
operand1 operator1 operand2 operand2 ... operatorN operandNThat 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.
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 |
| Unsure | {?code?} |
??? |