Identifiers

Language reference ››
Parent Previous Next

identifier = [ "_" ] letter { letter | digit | "_" } .
letter = ( "A".."Z" | "a".."z" ) .
digit = ( "0".."9" ) .


PMP's rule for identifiers differs a bit from the standard Pascal rule: an identifier may start with a single underscore character (access to some special declarations in MPASM™ syntax, such as __CONFIG constants), but identifiers starting with two underscores are illegal (reserved for PMP internal use).


As in standard Pascal language, identifiers may contain basic ASCII unaccented letters, digits and the underscore character (The underscore is always significant in an identifier); identifiers (as any keyword) are not case sensitive.


A PMP identifier is not limited in length, but it may generate some internal larger composite identifiers for which the total length may exceed the limits of the assembler (32 characters for MPASM). PMP will use a special squeezing technique to generate an alternate name that fits within the assembler limit of 32 characters, while trying to maintain enough visual information for debugging. Such compressed identifier appears in the assembler source file with a suffix consisting of a period followed by a unique numerical index.


The following identifiers are legal:

 _MyVar, TheVar, Var4, The_var


But these ones are illegal:

 _, __MyVar, 4TheVar, Var4$, The_var%