228
Pascal 4.0 User’s Guide
10
The Straightforward Part
—You can use the following items of information as
you find them in the manual, with no change:
•
The XView procedure names
•
The XView object names
•
The XView object data types (except
Boolean
, see the following section)
The More Complex Parts
—You must make the following changes:
•
Any elementary C data type used must be converted to the corresponding
Pascal data type.
•
Any C procedure that returns something must be invoked in Pascal as a
function; otherwise, it must be invoked as a procedure.
•
The XView type
Boolean
must be converted to the Pascal type,
boolean
.
Table 10-1 shows you how to convert C declarations to Pascal.
1. Defined in
stddefs_p.h
Table 10-1 C Declarations to Pascal Declarations
C
Pascal
int
integer
, subrange, or numeric constant
unsigned
unsigned
, subrange, or numeric constant
1
short
integer16
, subrange, or numeric constant
unsigned short unsigned16
, subrange, or nonnegative numeric constant
char
char
(or single-letter string literal for special definition modules)
float
shortreal
,
longreal
, or
real
constant (always passed
as
LONGREAL
)
double
real
or
real
constant
any pointer type
pointer type
any
enum
type
unsigned
type
any
struct
type
record
type of corresponding size and layout
char *
array of char
or string literal
other array types
array
type of corresponding size
Содержание 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: ......