Case sensitivity: Action code operators are always case-sensitive (unlike export codes).
Delimiters. Each discrete code action (explained further below), must be terminated with a semi-colon. This acts like a full stop (or period) in normal text writing. Tinderbox, will run the first action up to the first-semi-colon, before moving on to the next and so on. An agent query (see below) is always a single code expression and never uses a closing delimiter.
In action code, the delimiter can be omitted in two cases.
Firstly, the code contains a single one action. Both these are valid code for the same action:
$Color="red"
$Color="red";
Secondly, and action is the last action in a multi-action piece of action code. Both these are valid code for the same action:
$Color="red";$AccentColor="blue";$StartDate=date("now")
$Color="red";$AccentColor="blue";$StartDate=date("now");
Note, in this second context, how all actions except the last one must have a semi-colon delimiter.
Where multi-action code includes if() conditional sections, a delimiter must be placed after the closing '}' sholud other actions follow it. For instance:
if($Prototype=="Event"){$StartDate=date("today")}
But:
if($Prototype=="Event"){$StartDate=date("today")};$Color="red"
Note that the code inside the curly brackets does not need a delimiter as there is only one action. But, a further action follows the if() test so a delimiter is needed after the '}' that closes the if() action. Where there is an else branch, e.g. if(){}else{}, the delimiter goes after the '}' at the end of the else branch code inside the {} sections obeys the rules above and only needs delimiters between multiple actions.
However, if in doubt, use a delimiter after each action!
Agent Queries. These use action code, but use slightly different syntax that creates a single action code expression (see below) and queries never use a terminating delimiter. Tinderbox will generally not error if a trailing semicolon is used. But, a multi-expression query, with an inline semicolon, will likely not work correctly.
Expression: this is a term for a section of action code that is not a complete action, as described further here.
Coding conventions in Tinderbox. See more.
Review old code: Longtime users of Tinderbox should revisit code to ensure all string literals are quoted as current support for non-quoted string usage is for legacy purposes and will be withdrawn; by convention paths and designators are not quoted but there is no harm if they are and quoting all strings may be an easier approach for new users to take. Likewise, new users trying old code samples should be aware that the code may use legacy syntax.
See also—notes linking to here: