1.2.2 Identifiers

Summary: Identifiers are names of variables of a given type.

An identifier is a name that you invent and attach to a definition. Identifiers can be symbols representing variables, constants, procedure names, code labels, segment names, and user-defined data types such as structures, unions, records, and types defined with TYPEDEF. Identifiers longer than 247 characters generate an error.

Certain restrictions limit the names you can use for identifiers. Follow these rules to define a name for an identifier:

The first character of the identifier can be an alphabetic character (A–Z) or any of these four characters: @ _ $ ?

The other characters in the identifier can be any of the characters listed above or a decimal digit (0–9)

Avoid starting an identifier with the at sign (@), because MASM 6.0 predefines some special symbols starting with @ (see Section 1.2.3). Beginning an identifier with @ may also cause conflicts with future versions of the Macro Assembler.

The symbol––and thus the identifier––is visible as long as it remains within scope. (See Section 8.2, “Sharing Symbols with Include Files,” for additional information about visibility and scope.)