Download CueServer 2 User`s Manual

Transcript
Interactive Technologies, Inc.
CueServer 2 User's Manual - 1.0.8
Variables
A variable is a symbol that holds and represents a value. Variable symbols are names such as x,
MyVariable, or lcd.backlight. Variables can hold numbers (such as 3 or 12.7) or strings (such as Hello
World).
CueServer uses two different kinds of variables: User Variables and System Variables. User variables can
be any combination of printable letters, numbers, the underscore (_) or hyphen (-). System variables are
similar, but must contain a dot (.) character. The dot character is how the CueServer distinguishes between
User and System variables.
Assigning Values to Variables
There are two ways to assign a value to a variable. The first is with the Assign command. Here are a few
examples:
"x" = 3
"MyVariable" = 42
"Message" = "Hello World"
"y" = ('x' + 3)
The first line assigns the number 3 to the variable x. The second assigns the number 42 to the variable
MyVariable. The third assigns the string Hello World to the variable Message. The last example assigns the
result of the expression ‘x’+3 to the variable y.
The second way to assign a value to a variable is with the Set command. Here are a few examples:
Set
Set
Set
Set
x 3
MyVariable 42
Message "Hello World"
y ('x' + 3)
These examples are the same as above, except that the Set command is used instead of using the Assign
command.
Using Variable Values
To use variables in CueScript commands, enclose the variable name in single quotes ( 'MyVariable' ).
Last update: 2015/04/28 09:11:45
Page 57 of 169