REDUCE

2.3 Identifiers

Identifiers in REDUCE consist of one or more alphanumeric characters (i.e. alphabetic letters or decimal digits) the first of which must be alphabetic. The maximum number of characters allowed is implementation dependent, although twenty-four is permitted in most implementations. In addition, the underscore character (_) is considered a letter if it is within an identifier. For example,

        a az p1 q23p  a_very_long_variable

are all identifiers, whereas

        _a

is not.

A sequence of alphanumeric characters in which the first is a digit is interpreted as a product. For example, 2ab3c is interpreted as 2*ab3c. There is one exception to this: If the first letter after a digit is E, the system will try to interpret that part of the sequence as a real number, which may fail in some cases. For example, 2E12 is the real number 2.0 * 1012, 2e3c is 2000.0*C, and 2ebc gives an error.

Special characters, such as -, *, and blank, may be used in identifiers too, even as the first character, but each must be preceded by an exclamation mark in input. For example:

        light!-years    d!*!*n         good! morning  
        !$sign          !5goldrings

CAUTION: Many system identifiers have such special characters in their names (especially * and =). If the user accidentally picks the name of one of them for his own purposes it may have catastrophic consequences for his REDUCE run. Users are therefore advised to avoid such names.

Identifiers are used as variables, labels and to name arrays, operators and procedures.

Restrictions

The reserved words listed in section (?? may not be used as identifiers. No spaces may appear within an identifier, and an identifier may not extend over a line of text.