HP SunSoft Pascal 4.0 Uživatelský manuál Strana 234

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 333
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 233
210 Pascal 4.0 Users Guide
9
Compiler Semantic Errors
The following sections explain the typical formats and terminology used in
Pascal error messages.
Format of the Error Diagnostics
In the example program above, the error diagnostics from the Pascal compiler
include the line number in the text of the program, as well as the text of the
error message. While this number is most often the line where the error
occurred, it can refer to the line number containing a bracketing keyword like
end or until. If so, the diagnostic may refer to the previous statement. This
diagnostic occurs because of the method the compiler uses for sampling line
numbers. The absence of a trailing semicolon (;) in the previous statement
causes the line number corresponding to the end or until to become
associated with the statement.
As Pascal is a free-format language, the line number associations can only be
approximate and may seem arbitrary in some cases.
Incompatible Types
Since Pascal is a strongly-typed language, many type errors can occur, which
are called type clashes by the compiler.
The Pascal compiler distinguishes among the following type classes in its
diagnostics:
When you compile mism.p, the
end-of-file is reached before an
end delimiter
hostname% pc mism.p
E 26020-------^--- Malformed declaration
15130-------^--- Unexpected end-of-file - QUIT
array integer scalar
boolean pointer string
char real varying
file record
Zobrazit stránku 233
1 2 ... 229 230 231 232 233 234 235 236 237 238 239 ... 332 333

Komentáře k této Příručce

Žádné komentáře