Identifiers are names that allow you to reference stored values, such as variables and constants. Also, every program must be identified (hence the name) by an identifier.
Rules for identifiers:
Several identifiers are reserved in Pascal -- you cannot use them
as your own identifiers. They are:
and | array | begin | case | const | div | do | downto |
else | end | file | for | forward | function | goto | if |
in | label | mod | nil | not | of | or | packed |
procedure | program | record | repeat | set | then | to | type |
until | var | while | with |
Also, Pascal has several pre-defined identifiers. You can replace
them with your own definitions, but then you would remove part of
the functionality of Pascal.
abs | arctan | boolean | char | cos | dispose | eof | eoln |
exp | false | input | integer | ln | maxint | new | odd |
ord | output | pack | page | pred | read | readln | real |
reset | rewrite | round | sin | sqr | sqrt | succ | text |
true | trunc | write | writeln |
Pascal is not case sensitive! MyProgram, MYPROGRAM, and mYpRoGrAm are equivalent. But for readability purposes, it is a good idea to use meaningful capitalization! Because C, C++, and Java, the dominant programming languages of today, are case- sensitive, future Pascal implementations may become case-sensitive.
Identifiers can be any length, but some Pascal compilers will only
look at the first several characters. Supposing this number is 32.
Then,
     ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFAlphaBeta
     ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGammaDelta
would be equivalent.
One usually does not push the rules with extremely long identifiers or loads of special characters, since it does not confer much benefit on the program's functionality. Also, staying well within the bounds of identifier rules will aid cross-platform compatibility. Most programmers make do with just alphanumeric characters.