O'Reilly logo

Lingo in a Nutshell by Bruce A. Epstein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

Constants are common values, such as PI, FALSE, and TRUE, that are predefined in Lingo for convenience.

Literals

Literals are fixed values specified by the programmer, such as 6 (an integer literal), and “flubber” (a string literal).

Symbols

Symbols are a convenient way to represent strings or integers. Lingo includes some symbols, such as #digitalVideo, and the programmer can define others.

Variables

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required