C.2 Scanner messages.

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.

Fatal error 2000: Unexpected end of file

This typically happens in one of the following cases:
Fatal error 2001: String exceeds line

There is a missing closing ’ in a string, so it occupies multiple lines.
Fatal error 2002: Illegal character ”arg. 1” (arg. 2)

An illegal character was encountered in the input file.
Fatal error 2003: Syntax error, ”arg. 1” expected but ”arg. 2” found

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.
Start reading includefile arg. 1

When you provide the -vt switch, the compiler tells you when it starts reading an included file.
Warning 2005: Comment level arg. 1found

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.
Note 2008: Ignored compiler switch ”arg. 1

With -vn on, the compiler warns if it ignores a switch.
Warning 2009: Illegal compiler switch ”arg. 1

You included a compiler switch (i.e. {$... }) which the compiler does not recognise.
Warning 2010: Misplaced global compiler switch, ignored

The compiler switch is misplaced. It must be located at the start of the compilation unit, before the uses clause or any declaration.
Error 2011: 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 error 2012: Cannot open file ”arg. 1

Free Pascal cannot find the program or unit source file you specified on the command line.
Fatal error 2013: Cannot open include file ”arg. 1

Free Pascal cannot find the source file you specified in a {$include ..} statement.
Error 2015: Illegal record alignment specifier ”arg. 1

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.
Error 2016: Illegal enum minimum-size specifier ”arg. 1

You are specifying the {$PACKENUM n} with an illegal value for n. Only 1,2,4, NORMAL or DEFAULT is valid here.
Error 2017: $ENDIF expected for arg. 1〉 〈arg. 2defined in arg. 3line arg. 4

Your conditional compilation statements are unbalanced.
Error 2018: Syntax error while parsing a conditional compiling expression

There is an error in the expression following the {$if ..}, {$ifc } or {$setc } compiler directives.
Error 2019: Evaluating a conditional compiling expression

There is an error in the expression following the {$if ..}, ifcorsetc compiler directives.
Warning 2020: Macro contents are limited to 255 characters in length

The contents of macros cannot be longer than 255 characters.
Error 2021: ENDIF without IF(N)DEF

Your {$IFDEF ..} and {$ENDIF} statements are not balanced.
Fatal error 2022: User defined: arg. 1

A user defined fatal error occurred. See also the Programmer’s Guide.
Error 2023: User defined: arg. 1

A user defined error occurred. See also the Programmer’s Guide.
Warning 2024: User defined: arg. 1

A user defined warning occurred. See also the Programmer’s Guide.
Note 2025: User defined: arg. 1

A user defined note was encountered. See also the Programmer’s Guide.
Hint 2026: User defined: arg. 1

A user defined hint was encountered. See also the Programmer’s Guide.
Info 2027: User defined: arg. 1

User defined information was encountered. See also the Programmer’s Guide.
Error 2028: Keyword redefined as macro has no effect

You cannot redefine keywords with macros.
Fatal error 2029: Macro buffer overflow while reading or expanding a macro

Your macro or its result was too long for the compiler.
Warning 2030: 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 2031: Compiler switches are not supported in // styled comments

Compiler switches should be in normal Pascal style comments.
Handling switch ”arg. 1

When you set debugging info on (-vd) the compiler tells you when it is evaluating conditional compile statements.
ENDIF arg. 1found

When you turn on conditional messages (-vc), the compiler tells you where it encounters conditional statements.
IFDEF arg. 1found, arg. 2

When you turn on conditional messages (-vc), the compiler tells you where it encounters conditional statements.
IFOPT arg. 1found, arg. 2

When you turn on conditional messages (-vc), the compiler tells you where it encounters conditional statements.
IF arg. 1found, arg. 2

When you turn on conditional messages (-vc), the compiler tells you where it encounters conditional statements.
IFNDEF arg. 1found, arg. 2

When you turn on conditional messages (-vc), the compiler tells you where it encounters conditional statements.
ELSE arg. 1found, arg. 2

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 2040: 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 2041: Unsupported switch ”arg. 1

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 2042: Illegal compiler directive ”arg. 1

When warnings are turned on (-vw), the compiler warns you about unrecognised switches. For a list of recognised switches, see the Programmer’s Guide.
Back in arg. 1

When you use the -vt switch, the compiler tells you when it has finished reading an include file.
Warning 2044: Unsupported application type: ”arg. 1

You get this warning if you specify an unknown application type with the directive {$APPTYPE}.
Warning 2045: APPTYPE is not supported by the target OS

The {$APPTYPE} directive is supported by certain operating systems only.
Warning 2046: DESCRIPTION is not supported by the target OS

The {$DESCRIPTION} directive is not supported on this target OS.
Note 2047: VERSION is not supported by target OS

The {$VERSION} directive is not supported on this target OS.
Note 2048: VERSION only for exes or DLLs

The {$VERSION} directive is only used for executable or DLL sources.
Warning 2049: Wrong format for VERSION directive ”arg. 1

The {$VERSION} directive format is majorversion.minorversion where majorversion and minorversion are words.
Error 2050: Illegal assembler style specified ”arg. 1

When you specify an assembler mode with the {$ASMMODE xxx} directive, the compiler didn’t recognize the mode you specified.
Warning 2051: ASM reader switch is not possible inside asm statement, ”arg. 1” 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 2052: Wrong switch toggle, use ON/OFF or +/-

You need to use ON or OFF or a + or - to toggle the switch.
Error 2053: Resource files are not supported for this target

The target you are compiling for doesn’t support resource files.
Warning 2054: Include environment ”arg. 1” not found in environment

The included environment variable cannot be found in the environment; it will be replaced by an empty string instead.
Error 2055: Illegal value for FPU register limit

Valid values for this directive are 0..8 and NORMAL/DEFAULT.
Warning 2056: 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 2057: 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 command line or add {$MACRO ON} in the source.
Error 2058: Illegal interface type specified. Valids are COM, CORBA or DEFAULT.

The interface type that was specified is not supported.
Warning 2059: APPID is only supported for PalmOS

The {$APPID} directive is only supported for the PalmOS target.
Warning 2060: APPNAME is only supported for PalmOS

The {$APPNAME} directive is only supported for the PalmOS target.
Error 2061: Constant strings cannot be longer than 255 chars

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.
Fatal error 2062: 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 error 2063: Too many levels of PUSH

A maximum of 20 levels is allowed. This error occurs only in mode MacPas.
Error 2064: A POP without a preceding PUSH

This error occurs only in mode MacPas.
Error 2065: Macro or compile time variable ”arg. 1” does not have any value

Thus the conditional compile time expression cannot be evaluated.
Error 2066: 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 2067: Mode switch ”arg. 1” not allowed here

A mode switch has already been encountered, or, in the case of option -Mmacpas, a mode switch occurs after UNIT.
Error 2068: Compile time variable or macro ”arg. 1” is not defined.

Thus the conditional compile time expression cannot be evaluated. Only in mode MacPas.
Error 2069: UTF-8 code greater than 65535 found

Free Pascal handles UTF-8 strings internally as widestrings, i.e. the char codes are limited to 65535.
Error 2070: 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 a UTF-8 encoding signature ($ef, $bb, $bf) at the beginning of a file, so it interprets it as a UTF-8 file.
Error 2072: Compile time expression: Wanted arg. 1but got arg. 2at arg. 3

The type-check of a compile time expression failed.
Note 2073: APPTYPE is not supported by the target OS

The {$APPTYPE} directive is supported by certain operating systems only.
Error 2074: Illegal optimization specified ”arg. 1

You specified an optimization with the {$OPTIMIZATION xxx} directive, and the compiler didn’t recognize the optimization you specified.
Warning 2075: SETPEFLAGS is not supported by the target OS

The {$SETPEFLAGS} directive is not supported by the target OS.
Warning 2076: IMAGEBASE is not supported by the target OS

The {$IMAGEBASE} directive is not supported by the target OS.
Warning 2077: MINSTACKSIZE is not supported by the target OS

The {$MINSTACKSIZE} directive is not supported by the target OS.
Warning 2078: MAXSTACKSIZE is not supported by the target OS

The {$MAXSTACKSIZE} directive is not supported by the target OS.
Error 2079: Illegal state ”arg. 1” for $WARN directive

Only ON and OFF can be used as state with a {$WARN} compiler directive.
Error 2080: Illegal set packing value

Only 0, 1, 2, 4, 8, DEFAULT and NORMAL are allowed as packset parameters.
Warning 2081: PIC directive or switch ignored

Several targets, such as Windows, do not support nor need PIC, so the PIC directive and switch are ignored.
Warning 2082: The switch ”arg. 1” is not supported by the currently selected target

Some compiler switches like $E are not supported by all targets.
Warning 2084: Framework-related options are only supported for Darwin/Mac OS X

Frameworks are not a known concept, or at least not supported by FPC, on operating systems other than Darwin/Mac OS X.
Error 2085: Illegal minimal floating point constant precision ”arg. 1

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.
Warning 2086: Overriding name of ”main” procedure multiple times, was previously set to ”arg. 1

The name for the main entry procedure is specified more than once. Only the last name will be used.
Warning 2087: Illegal identifier ”arg. 1” for $WARN directive

Identifier is not known by a {$WARN} compiler directive.
Error 2088: Illegal alignment directive

The alignment directive is not valid. Either the alignment type is not known or the alignment value is not a power of two.
Fatal error 2089: It is not possible to include a file that starts with an UTF-8 BOM in a module that uses a different code page

All source code that is part of a single compilation entity (program, library, unit) must be encoded in the same code page
Warning 2090: Directive ”arg. 1” is ignored for the current target platform

Some directives are ignored for certain targets, such as changing the packrecords and packenum settings on managed platforms.
Warning 2091: Current system codepage ”arg. 1” is not available for the compiler. Switching default codepage back to ”arg. 2”.

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.
Warning 2092: SETPEOPTFLAGS is not supported by the target OS

The {$SETPEOPTFLAGS} directive is not supported by the target OS.
Error 2093: Illegal argument for SETPEFLAGS

The given argument for SETPEFLAGS is neither a correct named value nor an ordinal value
Error 2094: Illegal argument for SETPEOPTFLAGS

The given argument for SETPEOPTFLAGS is neither a correct named value nor an ordinal value
Error 2095: Directive arg. 1is not supported on this target

Not all compiler directives are supported on all targets.
Warning 2096: The specified stack size is not within the valid range for the platform. Setting the stack size ignored.

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.
Warning 2097: The specified HeapMax value is smaller than the HeapMin value. Setting HeapMax ignored.

The HeapMax value (if specified) must be greater than or equal to the HeapMin value. Otherwise, the HeapMax value is ignored.
Error 2098: Illegal argument for HUGEPOINTERNORMALIZATION

The only allowed values for HUGEPOINTERNORMALIZATION are BORLANDC, MICROSOFTC and WATCOMC.
Error 2099: Illegal assembler CPU instruction set specified ”arg. 1

When you specify an assembler CPU with the {$ASMCPU xxx} directive, the compiler didn’t recognize the CPU you specified.
Warning 2100: Specified syscall convention is not useable on this target

The specified syscall convention using the {$SYSCALL xxx} directive, is not useable on the current target system.
Warning 2101: Invalid syscall convention specified

The compiler did not recognize the syscall convention specified by the {$SYSCALL xxx} directive.
Warning 2102: SETPEUSERVERSION is not supported by the target OS

The {$SETPEUSERVERSION} directive is not supported by the target OS.
Warning 2103: SETPEOSVERSION is not supported by the target OS

The {$SETPEOSVERSION} directive is not supported by the target OS.
Warning 2104: SETPESUBSYSVERSION is not supported by the target OS

The {$SETPESUBSYSVERSION} directive is not supported by the target OS.
Note 2105: Changed CPU type to be consistent with specified controller

Error 2106: A macro/compiler variable name cannot be empty

Error 2107: $IFEND directive found without a matching $IF 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.
Error 2108: $ENDIF directive found without a matching $IF(N)DEF 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.
Error 2109: A Invalid RTTI clause (expected Explicit or Inherit)

The $RTTI directive needs to be followed either by EXPLICIT or INHERIT and entries for FIELDS, PROPERTIES or METHODS.
Error 2110: A Explicit clause requires at least one option (Methods, Properties or Fields)

An $RTTI EXPLICIT directive requires at least one of the FIELDS, PROPERTIES or METHODS entries.
Error 2111: A Invalid RTTI option ”arg. 1” (expected Methods, Properties or Fields)

The $RTTI EXPLICIT can only contain FIELDS, PROPERTIES and METHODS entries.
Error 2112: A Duplicate RTTI option ”arg. 1

An option in a $RTTI EXPLICIT directive can only appear once.
Error 2113: A The RTTI directive cannot be used here

The $RTTI directive can not be used in this location (e.g. before the PROGRAM or UNIT headers).