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 wasn’t closed.
-
Fatal: String exceeds line
- You forgot probably to include the 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: $F directive (FAR) ignored
- The FAR directive is a 16-bit construction which is
recorgnised but ignored by the compiler, since it produces 32 bit code.
-
Note: Stack check is global under Linux
- Stack checking with the -Cs switch is
ignored under LINUX, since LINUX does this for you. Only displayed when -vn is
used.
-
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 doesn’t know.
-
Warning: This compiler switch has a global effect
- When -vw is used, the compiler warns if
a switch is global.
-
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. The range is
1-255.
-
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: Too many $ENDIFs or $ELSEs
- Your {$IFDEF ..} and {$ENDIF} statements aren’t
balanced.
-
Warning: Records fields can be aligned to 1,2,4,8,16 or 32 bytes only
- You are specifying
the {$PACKRECORDS n} with an illegal value for n. Only 1, 2, 4, 8, 16 and 32 are valid in this
case.
-
Warning: Enumerated can be saved in 1,2 or 4 bytes only
- You are specifying the
{$PACKENUM n} with an illegal value for n. Only 1,2 or 4 are valid in this case.
-
Error: $ENDIF expected for arg1 arg2 defined in line arg3
- 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 ..} compiler directive.
-
Error: Evaluating a conditional compiling expression
- There is an error in the expression
following the {$if ..} compiler directive.
-
Warning: Macro contents is cut after char 255 to evalute expression
- The contents of
macros canno be longer than 255 characters. This is a safety in the compiler, to
prevent buffer overflows. This is shown as a warning, i.e. when the -vw switch is
used.
-
Error: ENDIF without IF(N)DEF
- Your {$IFDEF ..} and {$ENDIF} statements aren’t
balanced.
-
Fatal: User defined: arg1
- A user defined fatal error occurred. see also the Programmers
guide
-
Error: User defined: arg1
- A user defined error occurred. see also the Programmers
guide
-
Warning: User defined: arg1
- A user defined warning occurred. see also the Programmers
guide
-
Note: User defined: arg1
- A user defined note was encountered. see also the Programmers
guide
-
Hint: User defined: arg1
- A user defined hint was encountered. see also the Programmers
guide
-
Info: User defined: arg1
- 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 it’s
result was too long for the compiler.
-
Warning: Extension of macros exceeds a deep 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.
-
Error: compiler switches aren’t allowed in (* ... *) styled comments
- Compiler switches
should always be between { } comment delimiters.
-
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 warings 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, ff you specify an
unknown application type with the directive {$APPTYPE}
-
Warning: APPTYPE isn’t support by the target OS
- The {$APPTYPE} directive is
supported by win32 applications only.
-
Warning: DESCRIPTION is only supported for OS2 and Win32
- The {$DESCRIPTION}
directive is only supported for OS2 and Win32 targets.
-
Note: VERSION is not supported by target OS.
- The {$VERSION} directive is only
supported by win32 target.
-
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.
-
Warning: Unsupported 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 assmebler block.
The new reader will be used for next assembler statement 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. The only targets which can use resource files are Win32 and
OS/2 (EMX) currently
-
Warning: Include environment arg1 not found in environment
- The included environment
variable can’t be found in the environment, it’ll 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. This is the case of OS/2 (EMX) currently. 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
-
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.