User Guide
Chapter 344
All symbols, global variables, and names of parameters passed to global variables are stored in a
common lookup table.
Example
This statement sets the state variable to the symbol #Playing:
state = #Playing
See also
ilk(), string(), symbol(), symbolP()
. (dot operator)
Syntax
objectReference.objectProperty
textExpression.objectProperty
object.commandOrFunction()
Description
Operator; used to test or set properties of objects, or to issue a command or execute a function of
the object. The object may be a cast member, a sprite, a property list, a child object of a parent
script, or a behavior.
Examples
This statement displays the current member contained by the sprite in channel 10:
put sprite(10).member
To use the alternate syntax and call a function, you can use this form:
myColorObject = color(#rgb, 124, 22, 233)
put myColorObject.ilk()
-- #color
- (minus)
Syntax
(Negation): -expression
Description
Math operator; reverses the sign of the value of expression.
This is an arithmetic operator with a precedence level of 5.
Syntax
(Subtraction): expression1 - expression2
Description
Math operator; performs an arithmetic subtraction on two numerical expressions, subtracting
expression2 from expression1. When both expressions are integers, the difference is an
integer. When either or both expressions are floating-point numbers, the difference is a
floating-point number.
This is an arithmetic operator with a precedence level of 3.