Chapter 5. Data Types and Expressions
This chapter covers data types, expression evaluation, and operators. Refer to Chapter 1, for a discussion of variables, and to Chapter 8, for details on numeric data types. Refer to Chapter 7, for details on string manipulation and to Chapter 6, for many details on lists. See also Chapter 19, for a detailed discussion of symbols.
Data Types and Variable Types
In addition to Lingo keywords, Lingo uses constants, variables, symbols, and literals, which can contain various data types such as integers, floats, and strings.
Constants are common values, such as
TRUE, that are predefined in Lingo for convenience.
Literals are fixed values specified by the programmer, such as 6 (an integer literal), and “flubber” (a string literal).
Symbols are a convenient way to represent strings or integers. Lingo includes some symbols, such as #digitalVideo, and the programmer can define others.
Variables contain data that can change. A variable, such as
myHighScore, may equal 5 at one point but later be updated so that it equals 7.
Lingo data types, summarized in Table 5-1, include those common to most languages, as well as objects and other complex types that are unique to Lingo. Note that there is no double-precision float type or short integer type. Lists are roughly equivalent to arrays and structures. Refer to Chapter 1 and Chapter 6 for a discussion of variables and lists, and refer to Chapter 4, and the downloadable ...