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.

Table 10-1C Declarations to Pascal Declarations

C

Pascal

 

 

int

integer, subrange, or numeric constant

 

 

unsigned

unsigned, subrange, or numeric constant1

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

 

 

1.Defined in stddefs_p.h

228

Pascal 4.0 User’s Guide