HP SunSoft Pascal 4.0 - Manual

HP SunSoft Pascal 4.0

HP SunSoft Pascal 4.0 – Manual, read for free online in PDF format. We hope this helps you resolve any issues you may have. If you have further questions, please contact us through the contact form.

1 Page 1
2 Page 2
3 Page 3
4 Page 4
5 Page 5
6 Page 6
7 Page 7
8 Page 8
9 Page 9
10 Page 10
11 Page 11
12 Page 12
13 Page 13
14 Page 14
15 Page 15
16 Page 16
17 Page 17
18 Page 18
19 Page 19
20 Page 20
21 Page 21
22 Page 22
23 Page 23
24 Page 24
25 Page 25
26 Page 26
27 Page 27
28 Page 28
29 Page 29
30 Page 30
31 Page 31
32 Page 32
33 Page 33
34 Page 34
35 Page 35
36 Page 36
37 Page 37
38 Page 38
39 Page 39
40 Page 40
41 Page 41
42 Page 42
43 Page 43
44 Page 44
45 Page 45
46 Page 46
47 Page 47
48 Page 48
49 Page 49
50 Page 50
51 Page 51
52 Page 52
53 Page 53
54 Page 54
55 Page 55
56 Page 56
57 Page 57
58 Page 58
59 Page 59
60 Page 60
61 Page 61
62 Page 62
63 Page 63
64 Page 64
65 Page 65
66 Page 66
67 Page 67
68 Page 68
69 Page 69
70 Page 70
71 Page 71
72 Page 72
73 Page 73
74 Page 74
75 Page 75
76 Page 76
77 Page 77
78 Page 78
79 Page 79
80 Page 80
81 Page 81
82 Page 82
83 Page 83
84 Page 84
85 Page 85
86 Page 86
87 Page 87
88 Page 88
89 Page 89
90 Page 90
91 Page 91
92 Page 92
93 Page 93
94 Page 94
95 Page 95
96 Page 96
97 Page 97
98 Page 98
99 Page 99
100 Page 100
101 Page 101
102 Page 102
103 Page 103
104 Page 104
105 Page 105
106 Page 106
107 Page 107
108 Page 108
109 Page 109
110 Page 110
111 Page 111
112 Page 112
113 Page 113
114 Page 114
115 Page 115
116 Page 116
117 Page 117
118 Page 118
119 Page 119
120 Page 120
121 Page 121
122 Page 122
123 Page 123
124 Page 124
125 Page 125
126 Page 126
127 Page 127
128 Page 128
129 Page 129
130 Page 130
131 Page 131
132 Page 132
133 Page 133
134 Page 134
135 Page 135
136 Page 136
137 Page 137
138 Page 138
139 Page 139
140 Page 140
141 Page 141
142 Page 142
143 Page 143
144 Page 144
145 Page 145
146 Page 146
147 Page 147
148 Page 148
149 Page 149
150 Page 150
151 Page 151
152 Page 152
153 Page 153
154 Page 154
155 Page 155
156 Page 156
157 Page 157
158 Page 158
159 Page 159
160 Page 160
161 Page 161
162 Page 162
163 Page 163
164 Page 164
165 Page 165
166 Page 166
167 Page 167
168 Page 168
169 Page 169
170 Page 170
171 Page 171
172 Page 172
173 Page 173
174 Page 174
175 Page 175
176 Page 176
177 Page 177
178 Page 178
179 Page 179
180 Page 180
181 Page 181
182 Page 182
183 Page 183
184 Page 184
185 Page 185
186 Page 186
187 Page 187
188 Page 188
189 Page 189
190 Page 190
191 Page 191
192 Page 192
193 Page 193
194 Page 194
195 Page 195
196 Page 196
197 Page 197
198 Page 198
199 Page 199
200 Page 200
201 Page 201
202 Page 202
203 Page 203
204 Page 204
205 Page 205
206 Page 206
207 Page 207
208 Page 208
209 Page 209
210 Page 210
211 Page 211
212 Page 212
213 Page 213
214 Page 214
215 Page 215
216 Page 216
217 Page 217
218 Page 218
219 Page 219
220 Page 220
221 Page 221
222 Page 222
223 Page 223
224 Page 224
225 Page 225
226 Page 226
227 Page 227
228 Page 228
229 Page 229
230 Page 230
231 Page 231
232 Page 232
233 Page 233
234 Page 234
235 Page 235
236 Page 236
237 Page 237
238 Page 238
239 Page 239
240 Page 240
241 Page 241
242 Page 242
243 Page 243
244 Page 244
245 Page 245
246 Page 246
247 Page 247
248 Page 248
249 Page 249
250 Page 250
251 Page 251
252 Page 252
253 Page 253
254 Page 254
255 Page 255
256 Page 256
257 Page 257
258 Page 258
259 Page 259
260 Page 260
261 Page 261
262 Page 262
263 Page 263
264 Page 264
265 Page 265
266 Page 266
267 Page 267
268 Page 268
269 Page 269
270 Page 270
271 Page 271
272 Page 272
273 Page 273
274 Page 274
275 Page 275
276 Page 276
277 Page 277
278 Page 278
279 Page 279
280 Page 280
281 Page 281
282 Page 282
283 Page 283
284 Page 284
285 Page 285
286 Page 286
287 Page 287
288 Page 288
289 Page 289
290 Page 290
291 Page 291
292 Page 292
293 Page 293
294 Page 294
295 Page 295
296 Page 296
297 Page 297
298 Page 298
299 Page 299
300 Page 300
301 Page 301
302 Page 302
303 Page 303
304 Page 304
305 Page 305
306 Page 306
307 Page 307
308 Page 308
309 Page 309
310 Page 310
311 Page 311
312 Page 312
313 Page 313
314 Page 314
315 Page 315
316 Page 316
317 Page 317
318 Page 318
319 Page 319
320 Page 320
321 Page 321
322 Page 322
323 Page 323
324 Page 324
325 Page 325
326 Page 326
327 Page 327
328 Page 328
329 Page 329
330 Page 330
331 Page 331
332 Page 332
333 Page 333
Page: / 333

Table of Contents:

  • Page 3 – Contents; xix
  • Page 4 – pc
  • Page 5 – –config
  • Page 6 – level
  • Page 7 – path
  • Page 8 – –xlicinfo
  • Page 9 – Compiling without the
  • Page 12 – The
  • Page 13 – libm
  • Page 15 – Figures
  • Page 17 – Tables; –xl
  • Page 19 – Preface; Note –; unless otherwise indicated.; Operating Environment; For information on the operating environment, see the; Installation
  • Page 20 – Audience; Chapter 4, “Program Construction and Management,”
  • Page 21 – lists all the error messages the compiler; Conventions Used in This Guide
  • Page 22 – Shell Prompts in Command Examples; Manual Page
  • Page 23 – README; Other Related Documentation
  • Page 25 – Introduction; Standards; BSD. It complies with; FIPS PUB
  • Page 26 – Pascal Compiler; Compatibility
  • Page 27 – Text Editors; Text Editor; autoindent; Debuggers; dbx; XView Toolkit
  • Page 28 – Internationalization; Level 1; date
  • Page 29 – Locale; Licensing; —Does not queue request if no license is available.
  • Page 31 – Pascal Programs
  • Page 32 – Compiling the Program; Now compile the program with
  • Page 33 – Running the Program; mv
  • Page 34 – An Interactive Pascal Program
  • Page 35 – input
  • Page 36 – Using the same program, but with the; Using a File Name as a File Variable; lists
  • Page 37 – Where Did My Program Fail?; Using Pascal Traceback
  • Page 38 – Using a Sample Program with Segmentation Violation; which contains a segmentation violation:; Compiling and Running the Program
  • Page 39 – ErrorInHere; Using the
  • Page 41 – The Pascal Compiler
  • Page 42 – Compile and Link Sequence
  • Page 43 – Language Preprocessor
  • Page 44 – cpp; File Name Extensions Accepted By
  • Page 45 – ) followed by the option; Option-Passing in the Program Text; Here are four examples of how options can be passed in program text:
  • Page 47 – If no values have been pushed onto the stack, the effect of; Options; This section describes all the
  • Page 48 – binding
  • Page 51 – DOMAIN; name
  • Page 52 – –dalign; dalign; –fast
  • Page 53 – –fns; r option sets the IEEE 754 rounding mode that
  • Page 54 – r, compile all routines of the
  • Page 55 – name option names a shared dynamic library and
  • Page 56 – –help; pathname; file
  • Page 57 – directory; directory option adds directory to the
  • Page 58 – –libmil; lib option links; –misalign
  • Page 59 – –native
  • Page 60 – boolean
  • Page 61 – csh
  • Page 62 – limit datasize 16M; filename; filename. The default file name for executable files is
  • Page 63 – –pg; executable file, a more; –pic
  • Page 64 – –Qoption; sourcetype, which can be one of the following:
  • Page 66 – WITH
  • Page 70 – write; –sb; –sbfast
  • Page 71 – dir
  • Page 72 – –time
  • Page 73 – a option limits the set of instructions the
  • Page 74 – generic
  • Page 77 – c option defines the cache properties for use by
  • Page 78 – specifies the following:
  • Page 79 – –xF
  • Page 80 – xildon
  • Page 81 – –xMerge
  • Page 82 – Same as
  • Page 84 – option specifies the usage of registers for the
  • Page 85 – –xs; —This is the newer (and default) way of loading symbol tables.
  • Page 86 – t option specifies the target system for the
  • Page 87 – Each specific value for
  • Page 92 – includefile; Using Program Units and Module Units; Program unit
  • Page 93 – extern; Module unit; external; Compiling with Units
  • Page 94 – Using Units and Header Files
  • Page 95 – Sharing Variables Between Units
  • Page 96 – Here is a program unit that declares a variable:
  • Page 98 – Libraries; option. You can then link the
  • Page 99 – Separate Compilation
  • Page 100 – Using Program Units; Using Module Units; module; Sharing Variables and Routines Across Multiple Units; include
  • Page 101 – Sharing Public Variables
  • Page 102 – Using
  • Page 104 – Declarations
  • Page 106 – define; Variable Attribute; This example makes
  • Page 107 – Declaration
  • Page 108 – Files
  • Page 110 – In the previous example, the
  • Page 111 – Sharing Declarations in Multiple Units; FORTRAN; external c
  • Page 113 – The C–Pascal Interface; acc; Compilation of Mixed-Language Programs; You must use the compiler option
  • Page 114 – Compatibility of Types for C and Pascal
  • Page 115 – Precautions with Compatible Types
  • Page 116 – Array Indexes; Incompatibilities; Enumerated Types; char
  • Page 117 – Pascal Set Types; General Parameter Passing in C and Pascal; A few general rules apply to parameter passing:; Procedure Calls: C–Pascal; Here are examples of how a C main program calls a Pascal procedure:
  • Page 118 – Variable Parameters
  • Page 119 – Simple Types without; Without
  • Page 120 – Simple Types with
  • Page 121 – Fixed Arrays
  • Page 122 – option to compile the Pascal code, that difference with C is
  • Page 124 – You can pass any size array to a Pascal procedure expecting a
  • Page 125 – Conformant Arrays
  • Page 128 – If; lb; Example 3: Array of Characters
  • Page 129 – Records and Structures; in
  • Page 131 – Consider this example:
  • Page 132 – When you compile the Pascal routine without using the; Variant Records
  • Page 134 – Pascal Set Type; The nth element in a set
  • Page 135 – Pascal; The Pascal
  • Page 136 – Value Parameters; There are three types of value parameters in Pascal.
  • Page 138 – Arrays; univ
  • Page 139 – Function Return Values; Simple Types; The simple types pass in a straightforward way, as follows:
  • Page 140 – Input and Output; Also, in the C main program just before exit, add the following line:
  • Page 141 – Procedure Calls: Pascal–C; Simple types pass in a straightforward manner, as follows:
  • Page 142 – Strings of Characters
  • Page 144 – mktemp
  • Page 147 – The following example uses a single-dimension array:
  • Page 150 – Following are some examples:
  • Page 151 – Non-Pascal Procedures; nonpascal
  • Page 155 – Parameters That Are Pointers to Procedures
  • Page 156 – Procedures and Functions as Parameters
  • Page 157 – Global Variables in C and Pascal
  • Page 158 – File-Passing Between Pascal and C
  • Page 161 – CC
  • Page 162 – Compatibility of Types for C++ and Pascal; language construct. One common way to
  • Page 163 – Arguments Passed by Reference
  • Page 164 – Simple Types without the; Without the
  • Page 165 – With the
  • Page 174 – Arguments Passed by Value
  • Page 178 – Type
  • Page 180 – Simple Types Passed by Reference
  • Page 184 – The following example shows how to pass simple types:
  • Page 187 – The FORTRAN–Pascal Interface; –lpfc
  • Page 188 – Compatibility of Types for FORTRAN and Pascal
  • Page 189 – xl
  • Page 190 – Character Strings; Pascal enumerated types have no comparable type in FORTRAN.
  • Page 191 – General Parameter-Passing in FORTRAN and Pascal; A few general rules apply to passing parameters:
  • Page 192 – Pascal passes all; With
  • Page 193 – See the following example:
  • Page 194 – Simple Types with the
  • Page 198 – Example 2: Array of Characters
  • Page 203 – The Pascal set type is incompatible with FORTRAN.
  • Page 204 – In general, Pascal passes value parameters on the stack.
  • Page 207 – Pointers; Pointers are easy to pass, as shown in the following example:
  • Page 209 – There is no problem with returning a
  • Page 213 – Character Dummy Arguments; extern fortran
  • Page 214 – The following example illustrates this method:
  • Page 218 – Records and structures pass as follows:
  • Page 225 – The simple types pass in a straightforward way, as in this example:
  • Page 226 – You can return a; Routines as Parameters
  • Page 229 – Error Diagnostics; Appendix B, “Error Messages,” lists in numerical order all the error; Illegal Characters; Characters such as
  • Page 230 – String Errors
  • Page 232 – Undefined or Improper Identifiers; Expected Symbols and Malformed Constructs
  • Page 234 – Compiler Semantic Errors; Format of the Error Diagnostics; end; Incompatible Types
  • Page 236 – Scalar Error Messages; as other than a text file.; Expression Diagnostics
  • Page 237 – This program generates the following error messages:
  • Page 238 – Type Equivalence; produces the following diagnostic messages:
  • Page 239 – Alternatively, you could use the declaration:; Unreachable Statements
  • Page 241 – If you receive an; Runtime Errors; Following is a list of runtime errors that Pascal generates:
  • Page 242 – > : Bad data found on varying of char read
  • Page 245 – The XView Toolkit; The sections in this chapter are:
  • Page 246 – Tools
  • Page 247 – Pascal Interface
  • Page 248 – Compiling with Libraries; pxview; Header Files; Names; Attribute Procedures
  • Page 249 – set; Attribute Lists
  • Page 250 – ns; Handles; Scrollbar
  • Page 251 – Coding Fragment; bar; Conversion of C to Pascal; An Example; The Problem
  • Page 252 – The Straightforward Part; The More Complex Parts; Boolean
  • Page 253 – Sample Translation of an XView Function to Pascal; If you translate the entry to Pascal, it means:
  • Page 254 – Sample Program; The following program,
  • Page 255 – Menu Demo Program; Here is a more complicated program,
  • Page 256 – To compile
  • Page 257 – Math Libraries
  • Page 258 – Contents of the Math Libraries
  • Page 260 – IEEE Support Functions; This section describes the IEEE support functions, including
  • Page 261 – The functions described in
  • Page 262 – SPARC Libraries
  • Page 263 – Arithmetic Exceptions; Following are the five types of IEEE floating-point exceptions:; Invalid operation; —An operand is invalid for the operation about to be
  • Page 264 – Division by zero; Math Library Exception-Handling Function:
  • Page 265 – If your
  • Page 266 – libsunmath
  • Page 267 – The syntax of this function is described in the
  • Page 269 – Pascal Preprocessor; Conditional Variables
  • Page 270 – true; Compiler Directives
  • Page 271 – Syntax
  • Page 272 – Example
  • Page 276 – Comments
  • Page 278 – enable
  • Page 280 – string
  • Page 281 – xpression
  • Page 283 – expression consists of a conditional variable and the optional
  • Page 286 – See the example under “The %list Directive.”
  • Page 287 – cppas
  • Page 289 – Error Messages; ts
  • Page 319 – 6140: Extension to WITH statement not allowed
  • Page 321 – Index
Loading the manual

Pascal 4.0 User’s Guide

Part No.: 802-2943-10
Revision A, November 1995

A Sun Microsystems, Inc. Business

2550 Garcia Avenue

Mountain View, CA 94043

U.S.A.

"Loading the manual" means you need to wait until the file loads and becomes available for online reading. Some manuals are very large, and the time they take to appear depends on your internet speed.

Summary

Page 3 - Contents; xix

iii Contents Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

Page 4 - pc

iv Pascal 4.0 User’s Guide Compiling the Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Running the Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Renaming the Executable File . . . . . . . . . . . . . . . . . . . . . . . . 9 An Interactive Pascal Progra...

Page 5 - –config

Contents v –c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 -calign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 –cg89 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

Other HP Models

All HP Other