User Guide

595
CHAPTER 13
Operators
This section provides an alphabetical list of all the operators available in Macromedia Director
MX 2004.
The majority of these operators apply only to Lingo. JavaScript syntax does contain some
operators that are either similar or identical to the Lingo operators listed here; therefore, where
appropriate, JavaScript syntax usage and examples are provided to help you map the functionality
of Lingo operators with their closest counterparts in JavaScript syntax. For more information
about JavaScript syntax operators, see Chapter 2, “Director Scripting Essentials,” on page 9.
# (symbol)
Usage
--Lingo syntax
#symbolName
// JavaScript syntax
symbol("symbolName");
Description
Symbol operator; defines a symbol, a self-contained unit that can be used to represent a condition
or flag. The value
symbolName begins with an alphabetical character and may be followed by any
number of alphabetical or numerical characters.
A symbol can do the following:
Assign a value to a variable.
Compare strings, integers, rectangles, and points.
Pass a parameter to a handler or method.
Return a value from a handler or method.
A symbol takes up less space than a string and can be manipulated, but unlike a string it does not
consist of individual characters. You can convert a symbol to a string for display purposes by using
the
string function.
The following are some important points about symbol syntax:
Symbols are not case-sensitive.
Symbols cant start with a number.
Spaces may not be used, but you can use underscore characters to simulate them.