Lingo Dictionary > Symbols > # (symbol) |  |

# (symbol)

Syntax

    #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:

| 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 can't start with a number.
| Spaces may not be used, but you can use underscore characters to simulate them.
| Periods may not be used in symbols.

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()`