206
Pascal 4.0 User’s Guide
9
Most nonprinting characters in your input are also illegal, except in character
constants and character strings. Except for the tab and formfeed characters,
which are used to format the program, nonprinting characters in the input file
print as the character
?
in your listing.
String Errors
Encountering an end-of-line after an opening string quotation mark (
'
)
without first encountering the matching closing quote yields the diagnostic:
Unmatched ' for string.
Also, anything enclosed in double quotes (for example,
"hello"
) is treated as
a comment and is, therefore, ignored.
Programs containing
#
characters (other than in column 1 or in arbitrary-based
integers) can produce this diagnostic, because early implementations of Pascal
use
#
as a string delimiter. In this version,
#
is used for
#include
and
preprocessor directives, and must be in column 1.
Digits in Real Numbers
Pascal requires digits in
real
numbers before the decimal point. Thus, the
statements
b := .075;
and
c := 05e-10;
generate the following
diagnostics in Pascal:
These constructs are also illegal as data input to variables in
read
statements
whose arguments are variables of type
real
,
single
,
shortreal
,
double
,
and
longreal
.
Mon Feb 13 10:46:44 1995 digerr.p:
5
b:= .075;
e 18740-------------------^--- Digits required before decimal
point
6
c:= .05e-10
e 18740-------------------^--- Digits required before decimal
point
Содержание SunSoft Pascal 4.0
Страница 14: ...xiv Pascal 4 0 User s Guide ...
Страница 16: ...xvi Pascal 4 0 User s Guide ...
Страница 30: ...6 Pascal 4 0 User s Guide 1 ...
Страница 160: ...136 Pascal 4 0 User s Guide 6 ...
Страница 268: ...244 Pascal 4 0 User s Guide 11 ...
Страница 320: ...296 Pascal 4 0 User s Guide B ...
Страница 331: ...Index 307 ...
Страница 333: ......