[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Error 41 Syntax Error or Incorrect Identifier pp 322
Source: Compiler
Cause: Syntax Error:
Incorrectly spelled or unknown identifier.
First character of identifier is not letter or underscore.
Incorrect Identifier:
Remedy: Examine the statement ahead of the error cursor for the above
condition.
Notes: Legal characters for identifiers are letters, digits, and the
underscore.
An identifier must begin with either a letter or underscore.
Example:
CONST
WSpace : Set of Char = { Wrong - CHR use illegal with SET }
[Chr(9),Chr(10),
Chr(13),Chr(32)];
WSpace : Set of Char = { Correct - use Ordinals with SET }
[#9,#10,#13,#32];
Drive = 'A' ; { Constant value of 'A' }
VAR
BVar : Byte ; { Byte type }
CVar : Char ; { Char type }
IVar : Integer ; { Integer type }
SVar : String [10] ; { String type }
RVar : Real ; { Real type }
BEGIN
RVar := .1234 ; { Wrong - needs leading zero }
RVar := 0.1234 ; { Correct }
Drive := 'B' : { Wrong - can't reassign a constant }
END.
See Also:
Boolean
Byte
Char
Integer
Real
String
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson