Variables

User-defined variables in the exotool activity language mauy be created simply by making use of them: No explicit specification or declaration of the variable, its type (what kind of data the variable stores) or location (where the variable's data is located i.e. on the client or the server or boat) is necessary: Exotool determines these characteristics based on how they are used and accessed.

Variables are referred to by their name. Variable names may include any alphanumeric letters a-z in upper or lower case, or the underbar "_" symbol. digits 0-9 may also be used as part of a variable name, except for in the first character position.

Variable References

Variables may be written or referenced directly or by modified form. Modified variable references consist of a named variable reference followed by one or more array modifiers (e.g. [<expression>]) or element references (e.g. .<member name>)

Format Reference Type Description
<name>Direct accessRefers to the value of variable with the given name
<name>[<expresssion>]Array ReferenceAssumes the variable's value is an array and Refers to the array's element indexed by the value of the expression.
<name>.<member name>Structure referenceAssumes the variable's value is a structure of named elements, and refers to the element with the given member name

Examples

myvar = 2
alert(var1)
alpha = beta
myarray[5] = "A string"
anotherArray[b][4] = true
mystruct.alpha = majorvalues.defaultAlpha
theperson.age = theperson.age + 1
item.quantity = 4