identifiers
A name a declaration or a binding carries. It begins with a letter or an underscore, continues with letters, digits, and underscores, and its letters are ASCII.
const structure: int32 = 1;
const bit8: int32 = 8;
const uint8_new: int32 = 9;
const int032: int32 = 32;Spelling
The longest match wins, so a name that merely begins with a keyword, or with a width-suffixed type name, is an ordinary name.
structure,bit8,float321, anduint8_neware names. Only the exact spelling is taken as the keyword or the type, and a declaration cannot use it.int032is a name rather than a type, because a width does not carry a leading zero.- A lone
_is the discard token, not a name. A declaration cannot be called_. - Names are case-sensitive.
Related
- comments and whitespace — the text between names that means nothing.
- module — the names in a file header, which bind nothing inside the file.
- literals — the number, string, and
bitforms a value is written in.