This section lists the messages that the scanner emits. The scanner takes care of the lexical
structure of the pascal file, i.e. it tries to find reserved words, strings, etc. It also takes care of
directives and conditional compiling handling.
Fatal: Unexpected end of file
this typically happens in one of the following cases
:
The source file ends before the final end. statement. This happens mostly when
the begin and end statements aren’t balanced;
An include file ends in the middle of a statement.
A comment was not closed
Fatal: String exceeds line
There is a missing closing ’ in a string, so it occupies multiple
lines.
Fatal: illegal character ”arg1” (arg2)
An illegal character was encountered in the input
file.
Fatal: Syntax error, ”arg1” expected but ”arg2” found
This indicates that the compiler
expected a different token than the one you typed. It can occur almost everywhere where you
make a mistake against the pascal language.
Start reading includefile arg1
When you provide the -vt switch, the compiler tells you when it
starts reading an included file.
Warning: Comment level arg1 found
When the -vw switch is used, then the compiler warns
you if it finds nested comments. Nested comments are not allowed in Turbo Pascal and can
be a possible source of errors.
Note: Ignored compiler switch ”arg1”
With -vn on, the compiler warns if it ignores a
switch
Warning: Illegal compiler switch ”arg1”
You included a compiler switch (i.e. {$... }) which
the compiler does not recognise
Warning: Misplaced global compiler switch
The compiler switch is misplaced, and should be
located at the start of the unit or program.
Error: Illegal char constant
This happens when you specify a character with its ASCII code, as
in #96, but the number is either illegal, or out of range.
Fatal: Can’t open file ”arg1”
Free Pascal cannot find the program or unit source file you
specified on the command line.
Fatal: Can’t open include file ”arg1”
Free Pascal cannot find the source file you specified in a
{$include ..} statement.
Error: Illegal record alignment specifier ”arg1”
You are specifying the {$PACKRECORDS n}
or {$ALIGN n} with an illegal value for n. For $PACKRECORDS valid alignments are 1, 2,
4, 8, 16, 32, C, NORMAL, DEFAULT, and for $ALIGN valid alignment are 1, 2, 4, 8, 16, 32,
ON, OFF. Under mode MacPas $ALIGN also supports MAC68K, POWER and
RESET.
Error: Illegal enum minimum-size specifier ”arg1”
You are specifying the {$PACKENUM n}
with an illegal value for n. Only 1,2,4, NORMAL or DEFAULT are valid here.
Error: $ENDIF expected for arg1 arg2 defined in arg3 line arg4
Your conditional
compilation statements are unbalanced.
Error: Syntax error while parsing a conditional compiling expression
There is an error
in the expression following the {$if ..}, ifcorsetc compiler directives.
Error: Evaluating a conditional compiling expression
There is an error in the expression
following the {$if ..}, ifcorsetc compiler directives.
Warning: Macro contents are limited to 255 characters in length
The contents of macros
cannot be longer than 255 characters.
Error: ENDIF without IF(N)DEF
Your {$IFDEF ..} and {$ENDIF} statements aren’t
balanced.
User defined information was encountered. see also the Programmers
guide
Error: Keyword redefined as macro has no effect
You cannot redefine keywords with
macros.
Fatal: Macro buffer overflow while reading or expanding a macro
Your macro or its
result was too long for the compiler.
Warning: Expanding of macros exceeds a depth of 16.
When expanding a macro, macros
have been nested to a level of 16. The compiler will expand no further, since this may be a
sign that recursion is used.
Warning: compiler switches aren’t supported in // styled comments
Compiler switches
should be in normal pascal style comments.
Handling switch ”arg1”
When you set debugging info on (-vd) the compiler tells you when it is
evaluating conditional compile statements.
ENDIF arg1 found
When you turn on conditional messages(-vc), the compiler tells you where
it encounters conditional statements.
IFDEF arg1 found, arg2
When you turn on conditional messages(-vc), the compiler tells you
where it encounters conditional statements.
IFOPT arg1 found, arg2
When you turn on conditional messages(-vc), the compiler tells you
where it encounters conditional statements.
IF arg1 found, arg2
When you turn on conditional messages(-vc), the compiler tells you where
it encounters conditional statements.
IFNDEF arg1 found, arg2
When you turn on conditional messages(-vc), the compiler tells you
where it encounters conditional statements.
ELSE arg1 found, arg2
When you turn on conditional messages(-vc), the compiler tells you
where it encounters conditional statements.
Skipping until...
When you turn on conditional messages(-vc), the compiler tells you
where it encounters conditional statements, and whether it is skipping or compiling
parts.
Info: Press ¡return¿ to continue
When the -vi switch is used, the compiler stops
compilation and waits for the Enter key to be pressed when it encounters a {$STOP}
directive.
Warning: Unsupported switch ”arg1”
When warnings are turned on (-vw) the compiler
warns you about unsupported switches. This means that the switch is used in Delphi or
Turbo Pascal, but not in Free Pascal
Warning: Illegal compiler directive ”arg1”
When warings are turned on (-vw) the compiler
warns you about unrecognised switches. For a list of recognised switches, Programmers
guide
Back in arg1
When you use (-vt) the compiler tells you when it has finished reading an include
file.
Warning: Unsupported application type: ”arg1”
You get this warning, if you specify an
unknown application type with the directive {$APPTYPE}
Warning: APPTYPE is not supported by the target OS
The {$APPTYPE} directive is
supported by certain operating systems only.
Warning: DESCRIPTION is not supported by the target OS
The {$DESCRIPTION}
directive is not supported on this target OS
Note: VERSION is not supported by target OS
The {$VERSION} directive is not supported
on this target OS
Note: VERSION only for exes or DLLs
The {$VERSION} directive is only used for executable
or DLL sources.
Warning: Wrong format for VERSION directive ”arg1”
The {$VERSION} directive
format is majorversion.minorversion where majorversion and minorversion are
words.
Error: Illegal assembler style specified ”arg1”
When you specify an assembler mode with
the {$ASMMODE xxx} the compiler didn’t recognize the mode you specified.
Warning: ASM reader switch is not possible inside asm statement, ”arg1” will be effective only for next
It is not possible to switch from one assembler reader to another inside an assembler block.
The new reader will be used for next assembler statements only.
Error: Wrong switch toggle, use ON/OFF or +/-
You need to use ON or OFF or a + or -
to toggle the switch
Error: Resource files are not supported for this target
The target you are compiling for
doesn’t support resource files.
Warning: Include environment ”arg1” not found in environment
The included
environment variable can’t be found in the environment, it will be replaced by an empty
string instead.
Error: Illegal value for FPU register limit
Valid values for this directive are 0..8 and
NORMAL/DEFAULT
Warning: Only one resource file is supported for this target
The target you are compiling
for supports only one resource file. The first resource file found is used, the others are
discarded.
Warning: Macro support has been turned off
A macro declaration has been found, but
macro support is currently off, so the declaration will be ignored. To turn macro
support on compile with -Sm on the commandline or add {$MACRO ON} in the
source
Error: Illegal interface type specified. Valids are COM, CORBA or DEFAULT.
The
interface type that was specified is not supported
Warning: APPID is only supported for PalmOS
The {$APPID} directive is only supported
for the PalmOS target.
Warning: APPNAME is only supported for PalmOS
The {$APPNAME} directive is only
supported for the PalmOS target.
Error: Constant strings can’t be longer than 255 chars
A single string constant can
contain at most 255 chars. Try splitting up the string in multiple smaller parts and
concatenate them with a + operator.
Fatal: Including include files exceeds a depth of 16.
When including include files the files
have been nested to a level of 16. The compiler will expand no further, since this may be a
sign that recursion is used.
Fatal: Too many levels of PUSH
A maximum of 20 levels is allowed. This error occurs only in
mode MacPas.
Error: A POP without a preceding PUSH
This error occurs only in mode MacPas.
Error: Macro or compile time variable ”arg1” does not have any value
Thus the
conditional compile time expression cannot be evaluated.
Error: Wrong switch toggle, use ON/OFF/DEFAULT or +/-/*
You need to use ON or
OFF or DEFAULT or a + or - or * to toggle the switch
Error: Mode switch ”arg1” not allowed here
A mode switch has already been encountered,
or, in case of option -Mmacpas, a mode switch occur after UNIT.
Error: Compile time variable or macro ”arg1” is not defined.
Thus the conditional
compile time expression cannot be evaluated. Only in mode MacPas.
Error: UTF-8 code greater than 65535 found
Free Pascal handles utf-8 strings internally as
widestrings e.g. the char codes are limited to 65535
Error: Malformed UTF-8 string
The given string isn’t a valid UTF-8 string
UTF-8 signature found, using UTF-8 encoding
The compiler found an UTF-8 encoding
signature ($ef, $bb, $bf) at the beginning of a file, so it interprets it as an UTF-8
file
Error: Compile time expression: Wanted arg1 but got arg2 at arg3
Type check of a
compile time expression failed.
Note: APPTYPE is not supported by the target OS
The {$APPTYPE} directive is
supported by certain operating systems only.