Tinderbox v11 Icon

Stand-alone expressions

Actions may include stand-alone expressions, that is expressions without an assignment or if() clause. A stand-alone expression cannot change any attributes but a few expressions have useful side-effects, including use of the runCommand, linkTo, linkFrom, unlinkTo, and unlinkFrom operators. Often, the output from these operators is of no practical use and this saves the need for adding a user attribute simply to run this type of operator.

User functions is another case. The action may simply be a call to a function. The immediate expression (action) results in the function running. The overall effects of that reflect the code in the function, but are unrelated to the calling action save for the fact that if the overall action has multiple actions, later actions will not be run until the function has completed.

The action() function makes it easier to execute standalone code expressions.