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 compilation handling.
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 are not balanced;
An include file ends in the middle of a statement.
A comment was not closed.
There is a missing closing ’ in a string, so it occupies multiple lines.
This indicates that the compiler expected a different token than the one you typed. It can
occur almost anywhere it is possible to make an error against the Pascal language.
When you provide the -vt switch, the compiler tells you when it starts reading an included
file.
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 Delphi, and can be a possible source
of errors.
You included a compiler switch (i.e. {$... }) which the compiler does not recognise.
The compiler switch is misplaced. It must be located at the start of the compilation unit,
before the uses clause or any declaration.
This happens when you specify a character with its ASCII code, as in #96, but the number is
either illegal, or out of range.
Free Pascal cannot find the program or unit source file you specified on the command line.
Free Pascal cannot find the source file you specified in a {$include ..} statement.
You are specifying {$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 alignments are 1, 2, 4, 8, 16, 32, ON, OFF.
Under mode MacPas $ALIGN also supports MAC68K, POWER and RESET.
You are specifying the {$PACKENUM n} with an illegal value for n. Only 1,2,4, NORMAL or
DEFAULT is valid here.
There is an error in the expression following the {$if ..}, {$ifc } or {$setc } compiler
directives.
There is an error in the expression following the {$if ..}, ifcorsetc compiler directives.
The contents of macros cannot be longer than 255 characters.
A user defined fatal error occurred. See also the Programmer’s Guide.
A user defined error occurred. See also the Programmer’s Guide.
A user defined warning occurred. See also the Programmer’s Guide.
A user defined note was encountered. See also the Programmer’s Guide.
A user defined hint was encountered. See also the Programmer’s Guide.
User defined information was encountered. See also the Programmer’s Guide.
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.
Compiler switches should be in normal Pascal style comments.
When you set debugging info on (-vd) the compiler tells you when it is evaluating conditional
compile statements.
When you turn on conditional messages (-vc), the compiler tells you where it encounters
conditional statements.
When you turn on conditional messages (-vc), the compiler tells you where it encounters
conditional statements.
When you turn on conditional messages (-vc), the compiler tells you where it encounters
conditional statements.
When you turn on conditional messages (-vc), the compiler tells you where it encounters
conditional statements.
When you turn on conditional messages (-vc), the compiler tells you where it encounters
conditional statements.
When you turn on conditional messages (-vc), the compiler tells you where it encounters
conditional statements.
When you turn on conditional messages (-vc), the compiler tells you where it
encounters conditional statements, and whether it is skipping or compiling parts.
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.
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.
When warnings are turned on (-vw), the compiler warns you about unrecognised switches.
For a list of recognised switches, see the Programmer’s Guide.
When you use the -vt switch, the compiler tells you when it has finished reading an include
file.
You get this warning if you specify an unknown application type with the directive
{$APPTYPE}.
The {$APPTYPE} directive is supported by certain operating systems only.
The {$DESCRIPTION} directive is not supported on this target OS.
The {$VERSION} directive is not supported on this target OS.
The {$VERSION} directive is only used for executable or DLL sources.
The {$VERSION} directive format is majorversion.minorversion where majorversion and
minorversion are words.
When you specify an assembler mode with the {$ASMMODE xxx} directive, the compiler didn’t
recognize the mode you specified.
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.
The target you are compiling for doesn’t support resource files.
The included environment variable cannot be found in the environment; it will be replaced by
an empty string instead.
Valid values for this directive are 0..8 and NORMAL/DEFAULT.
The target you are compiling for supports only one resource file. The first resource file found
is used, the others are discarded.
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 command line or add
{$MACRO ON} in the source.
The {$APPID} directive is only supported for the PalmOS target.
The {$APPNAME} directive is only supported for the PalmOS target.
A single string constant can contain at most 255 chars. Try splitting up the string into
multiple smaller parts and concatenate them with a + operator.
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.
A maximum of 20 levels is allowed. This error occurs only in mode MacPas.
Thus the conditional compile time expression cannot be evaluated.
You need to use ON or OFF or DEFAULT or a + or - or * to toggle the switch.
A mode switch has already been encountered, or, in the case of option -Mmacpas, a mode
switch occurs after UNIT.
Thus the conditional compile time expression cannot be evaluated. Only in mode MacPas.
Free Pascal handles UTF-8 strings internally as widestrings, i.e. the char codes are limited to
65535.
The compiler found a UTF-8 encoding signature ($ef, $bb, $bf) at the beginning of a file, so
it interprets it as a UTF-8 file.
The {$APPTYPE} directive is supported by certain operating systems only.
You specified an optimization with the {$OPTIMIZATION xxx} directive, and the compiler
didn’t recognize the optimization you specified.
The {$SETPEFLAGS} directive is not supported by the target OS.
The {$IMAGEBASE} directive is not supported by the target OS.
The {$MINSTACKSIZE} directive is not supported by the target OS.
The {$MAXSTACKSIZE} directive is not supported by the target OS.
Only ON and OFF can be used as state with a {$WARN} compiler directive.
Only 0, 1, 2, 4, 8, DEFAULT and NORMAL are allowed as packset parameters.
Several targets, such as Windows, do not support nor need PIC, so the PIC directive and
switch are ignored.
Some compiler switches like $E are not supported by all targets.
Frameworks are not a known concept, or at least not supported by FPC, on operating
systems other than Darwin/Mac OS X.
Valid minimal precisions for floating point constants are default, 32 and 64, which mean
respectively minimal (usually 32 bit), 32 bit and 64 bit precision.
The name for the main entry procedure is specified more than once. Only the last name will
be used.
The alignment directive is not valid. Either the alignment type is not known or the alignment
value is not a power of two.
All source code that is part of a single compilation entity (program, library, unit) must be
encoded in the same code page
Some directives are ignored for certain targets, such as changing the packrecords and
packenum settings on managed platforms.
The current system codepage is not known by the compiler. The compiler is compiled with
support for several codepages built-in. The codepage of the operation system is not in
that list. You will need to recompile the compiler with support for this codepage.
The {$SETPEOPTFLAGS} directive is not supported by the target OS.
The given argument for SETPEFLAGS is neither a correct named value nor an ordinal value
The given argument for SETPEOPTFLAGS is neither a correct named value nor an ordinal
value
The valid range for the stack size is 1024 - 67107839 on 32 bit and 64 bit platforms and 1024
- 65520 on 16 bit platforms. Additionally, for Turbo Pascal 7 compatibility reasons, specifying
a stack size of 65521 on 16 bit platforms actually sets the stack size to 65520.
The HeapMax value (if specified) must be greater than or equal to the HeapMin value.
Otherwise, the HeapMax value is ignored.
The only allowed values for HUGEPOINTERNORMALIZATION are BORLANDC,
MICROSOFTC and WATCOMC.
When you specify an assembler CPU with the {$ASMCPU xxx} directive, the compiler didn’t
recognize the CPU you specified.
The specified syscall convention using the {$SYSCALL xxx} directive, is not useable on the
current target system.
The compiler did not recognize the syscall convention specified by the {$SYSCALL xxx}
directive.
The {$SETPEUSERVERSION} directive is not supported by the target OS.
The {$SETPEOSVERSION} directive is not supported by the target OS.
The {$SETPESUBSYSVERSION} directive is not supported by the target OS.
When legacy ifend is turned on by the directive $LEGACYIFEND, then the $IF directive must
be closed by the $IFEND directive and the $IFDEF directive must be closed by the $ENDIF
directive.
When legacy ifend is turned on by the directive $LEGACYIFEND, then the $IF directive must
be closed by the $IFEND directive and the $IFDEF directive must be closed by the $ENDIF
directive.
The $RTTI directive needs to be followed either by EXPLICIT or INHERIT and entries for
FIELDS, PROPERTIES or METHODS.
An $RTTI EXPLICIT directive requires at least one of the FIELDS, PROPERTIES or METHODS
entries.
The $RTTI EXPLICIT can only contain FIELDS, PROPERTIES and METHODS entries.
An option in a $RTTI EXPLICIT directive can only appear once.
The $RTTI directive can not be used in this location (e.g. before the PROGRAM or UNIT
headers).