Identifiers (MIT/GNU Scheme 11.2)

Next: Uppercase and Lowercase, Previous: Delimiters, Up: Lexical Conventions [Contents][Index]

#### 1.3.3 Identifiers

An identifier is a sequence of one or more non-delimiter characters. Identifiers are used in several ways in Scheme programs:

- An identifier can be used as a variable or as a syntactic keyword.
- When an identifier appears as a literal or within a literal, it denotes a symbol.

Scheme accepts most of the identifiers that other programming languages allow. MIT/GNU Scheme allows all of the identifiers that standard Scheme does, plus many more.

MIT/GNU Scheme defines a potential identifier to be a sequence of non-delimiter characters that does not begin with either of the characters ‘`#`’ or ‘`,`’. Any such sequence of characters that is not a syntactically valid number (see Numbers) is considered to be a valid identifier. Note that, although it is legal for ‘`#`’ and ‘`,`’ to appear in an identifier (other than in the first character position), it is poor programming practice.

Here are some examples of identifiers:

    lambda             q
    list->vector       soup
    +                  V17a
    <=?                a34kTMNs
    the-word-recursion-has-many-meanings