HP SunSoft Pascal 4.0 User Manual

Page 9

Advertising
background image

Contents

ix

Sharing Variables Between Units . . . . . . . . . . . . . . . . . . . . . .

71

Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

74

5. Separate Compilation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

75

Working with Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

75

Using Program Units. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

76

Using Module Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

76

Sharing Variables and Routines Across Multiple Units . . . . . .

76

Compiling without the

-xl

Option. . . . . . . . . . . . . . . . . . . .

77

Using the

-xl

Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

80

Sharing Declarations in Multiple Units. . . . . . . . . . . . . . . . . . . .

87

6. The C–Pascal Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

89

Compilation of Mixed-Language Programs . . . . . . . . . . . . . . . .

89

Compatibility of Types for C and Pascal. . . . . . . . . . . . . . . . . . .

90

Precautions with Compatible Types . . . . . . . . . . . . . . . . . . .

91

Incompatibilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

92

General Parameter Passing in C and Pascal . . . . . . . . . . . . . . . .

93

Procedure Calls: C–Pascal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

93

Variable Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

94

Value Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

112

Function Return Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

115

Input and Output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

116

Procedure Calls: Pascal–C. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

117

Variable Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

117

Value Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

129

Advertising