Index
A
- -a option to pc command, 24
- a.out, 2, 8, 9, 17
- address parameters, 173
- alignment of types in FORTRAN, 169
- and operator, 42
- AnswerBook, xxvi
- arguments, See parameters
- arithmetic exceptions in math libraries, 231
- arrays, conformant
- parameters by value, 105, 118, 128, 197
- as(1) assembler, 44
- assert statement, 25
- automatic replacement of errors, 211
- Auto-Read
- definition, 65
- for dbx, disable, 64
B
- -B option to pc command, 24
- -b option to pc command, 25
- binding the multithread library, 238
- block buffering of program output, 25
- boolean expression, 40, 42
- breaking a program into parts, 71
- buffering of program output, controlling, 24
- built-in function and procedure type errors, 215
C
- -C option to pc command, 25, 53
- -c option to pc command, 25
- C programming language, 93 to 139, 253
- arrays by value, 118
- C calls Pascal, 97 to 120
- compatible types, 94
- function return values, 119, 135
- global variables in C and Pascal, 138
- parameter passing, 97
- parameters as pointers to procedures, 136
- Pascal
- calls C, 121 to 137
- interface, 93
- procedures and functions as parameters, 136
- records and structures, 109, 129
- sharing declarations, 92
- strings by value, 118
- value parameters, 134 to 135
- var parameters, 98, 121
- C++ programming language, 141 to 165
- arguments, passing of
- by reference, 143, 158
- by value, 154, 161
- arrays, fixed, 148
- C++ calls Pascal, 142 to 158
- character strings, 146
- compatible types, 142
- compiler options, 141
- function return values, 155, 163
- functions, 158
- global variables in C++ and Pascal, 164
- -lpc and -lc options, 141
- name encoding, 142
- parameter passing, 155
- Pascal
- calls C++, 158 to 163
- file pointers to C++, 165
- interface, 141
- records and structures, 150
- value parameters, 161
- -calign option to pc command, 26
- cg, the code generator, 18
- -cg89 option to pc command, 26
- -cg92 option to pc command, 26
- character data type, 32, 50
- characters, illegal, 209
- compatible types
- Pascal and C, 94
- Pascal and C++, 142
- Pascal and FORTRAN, 169
- compiler, 8, 11, 17 to 70
- driver, 18
- panics, 221
- compiler directives, 254 to 271
- #include, 71
- %config, 255
- %debug, 26, 257
- %else, 258
- %elseif, 259
- %elseifdef, 260
- %enable, 254, 262
- %endif, 263
- %error, 263
- %exit, 264
- %if, 255, 265
- %ifdef, 263, 265, 266
- %include, 267, 271
- %list, 268
- %nolist, 270
- %slibrary, 271
- %var, 255, 266, 271
- %warning, 271
- compiler semantic errors, 214 to 221
- can't read and write scalars, 216
- expression diagnostics, 216
- function and procedure type errors, 215
- goto statement, 220
- incompatible types, 214
- procedures and functions as parameters, 215
- scalar, 215
- type equivalence, 218
- uninitialized variables, 220
- unreachable statements, 219
- unused item errors, 220
- compiler syntax errors, 209 to 213
- digits in real numbers, 210
- expected symbols, malformed constructs, 212
- expected, unexpected, end-of-file, QUIT, 213
- illegal characters, 209
- replacements, insertions, deletions, 211
- string errors, 210
- undefined or improper identifiers, 212
- compiling
- a Pascal program, 8, 13
- multithreaded programs, 238
- units, 73
- -cond option to pc command, 26, 257
- cond_broadcast(3T), 241
- cond_signal(3T), 241
- cond_wait(3T), 241
- conditional
- compilation, 26
- variables, 241, 254
- -config option, 253, 260, 264
- defined, 254
- undefined, 253
- %config directive, 255
- -config option to pc command, 27, 254, 260
- conformant arrays
- parameters between Pascal and C, 105, 118, 128
- parameters between Pascal and C++, 155, 161, 163
- parameters between Pascal and FORTRAN, 186, 197
- conventions, xxv
- cpp
- #include directive, 71
- the C preprocessor, 18, 27, 44, 53, 253
- cppas, 253 to 271
- compiler directives, 254 to 271
- conditional variables, 253
- preprocessor, 26, 27, 44
- the -xl preprocessor, 18, 19
D
- -D option to pc command, 27
- -dalign option to pc command, 27
- data type character, 32, 50
- dbx, 3, 30, 65, 249, 250
- %debug compiler directive, 26, 257
- debugger, 3, 249
- debugging
- disable Auto-Read for dbx, 64
- fix-and-continue feature, 3
- multithreaded programs, 249, 250
- with dbx, 3, 249, 250
- with -g option to pc command, 30
- declarations
- define, 87
- sharing between multiple units of different languages, 91
- #define statement, 27
- define
- declaration, 87
- variable, 80
- define variable, 86
- diagnostics, format of, 214
- digits in real numbers, 210
- directives, See compiler directives
- -dn option to pc command, 27
- documentation, xxvi to xxvii
- DOMAIN Pascal, 26, 27
- -dryrun option to pc command, 28
- -dy option to pc command, 28
E
- %else directive, 258
- %elseif directive, 259
- %elseifdef directive, 260
- %enable directive, 254, 262
- %endif directive, 263
- end-of-file errors, 213
- enumerated types, 96, 170
- equivalence of types, errors, 218
- %error directive, 263
- error recovery, 211
- errors, 209 to 224
- automatic replacement, 211
- from incompatible types, 214
- from uninitialized variables, 220
- from unreachable statements, 219
- from unused items, 220
- illegal characters, 209
- in constructs, 212
- in ends of program files, 213
- in expressions, 216
- in function and procedure types, 215
- in goto statement, 220
- in identifiers, 212
- in reading and writing scalars, 216
- in real numbers, 210
- in scalars, 215
- in semantics, 214
- in strings, 210
- in symbols, 212
- in syntax, 209
- in type equivalence, 218
- out of memory, 221
- runtime, 221 to 224
- exception-handling function in math libraries, 232
- executable file, 2, 9, 11, 18, 50
- default, 9, 17
- how to rename, 9
- execution profile, 42
- %exit directive, 264
- expression diagnostics, 216
- extended language features, 60
- extern
- option, 90, 92
- variable, 80
- external option, See extern option
F
- -fast option to pc command, 28
- faster linking and initializing, 65
- fbe(1) assembler, 44
- features, Pascal compiler, 2
- file
- name extensions, 20
- variable, 12
- -flags option to pc command, 28, 31
- floating-point, nonstandard, 28
- -fnonstd option to pc command, 28
- -fns option to pc command, 29
- format of error diagnostics, 214
- FORTRAN programming language, 167 to 208
- and Pascal, compatible types, 169
- arrays by value, 186
- character dummy arguments, 193
- compatible types, 168
- FORTRAN calls Pascal, 172 to 189
- function return values, 188, 205
- incompatibilities with Pascal, 170
- parameter passing, 171
- Pascal
- calls FORTRAN, 189 to 206
- interface, 167
- procedures and functions as parameters, 206 to 208
- records and structures, 179, 198
- sharing declarations, 92
- strings by value, 186
- value parameters, 185, 201
- var parameters, 172, 190 to 201
- -fround=r option to pc command, 29
- -ftrap=t option to pc command, 29
- function
- extern option, 90, 92
- external, 92
- return values with C, 119, 135
- return values with FORTRAN, 188, 205
- type errors, 215
G
- -G option to pc command, 30
- -g option to pc command, 30
- global variables
- C and Pascal, 138
- C++ and Pascal, 164
- goto statement, compiler semantic error, 220
H
- -H option to pc command, 31, 53
- header files
- in a program, 74
- math libraries, 225
- -help option to pc command, 28, 31
- -hname option to pc command, 31
I
- -I option to pc command, 31
- -i option to pc command, 32
- I/O errors, 216, 221
- identifier errors, 212
- identifiers, 32, 50, 80
- IEEE support functions in math libraries, 228
- %if directive, 255, 265
- %ifdef directive, 263, 265, 266
- ild(1) incremental linker, 44
- illegal characters, 209
- #include directive, 71
- %include directive, 267, 271
- include file, 88, 265
- and library header files, 78
- as header file, 74
- introduction, 71
- producing a listing of, 32
- search order, 31
- to break a program up, 71
- incompatible type errors, 214
- input, 10 to 13
- installation, xxiii
- interface
- C++-Pascal, 141
- C-Pascal, 93
- FORTRAN-Pascal, 167
- internationalization, 3
- iropt, 44
K
- -keeptmp option to pc command, 32
- keyword, 32, 50
- -Kpic and -KPIC options to pc command, 43
L
- -L option to pc command, 32
- -l option to pc command, 33, 269
- language support, See internationalization
- ld(1) linker, 18, 25, 34, 44, 238
- -Ldirectory option to pc command, 33
- Level 0 standard Pascal, 1, 50
- Level 1 standard Pascal, 1, 50
- lib object library, 34
- libm functions in math libraries, 227
- libm.a math library, 226
- libm.so math library, 226
- -libmieee option to pc command, 33
- -libmil option to pc command, 33
- libpc_mt library, 34
- libraries
- binding with #include, 238
- creating, 78
- multithread, libthread, 237
- multithreading subroutines, libthread, 240
- multithreading-safe, libc, libpc, 237
- libsunmath support in math libraries, 234
- libsunmath.a math library, 226
- licensing, 5
- -noqueue option, 5
- queuing, 5
- status, 5
- -xlicinfo option, 5
- lightweight processes, See LWPs
- line buffering, of program output, 24
- linelimit procedure, 25
- linker, See ld linker
- linking units, 73
- %list directive, 268
- listing the Pascal program, 33
- -llib option to pc command, 34
- locale language support, 5
- locks
- multiple-readers/single-writer, 240
- rw_rdlock(3T), 242
- rw_unlock(3T), 242
- rw_wrlock(3T), 242
- rwlock(3T), 242
- rwlock_init(3T), 242
- mutual exclusion lock
- mutex(3T), 241
- mutex_lock(3T), 241
- mutex_unlock(3T), 241
- logic errors, 219
- lowercase characters, 32, 50
- LWPs
- in UNIX processes, 240
- multiplexing, scheduling, 240
- threads control, 239
M
- malformed construct errors, 212
- manuals, See documentation
- math libraries, 225 to 235, 237 to ??
- arithmetic exceptions, 231
- contents, 226
- function and procedure prototypes, 225
- IEEE support functions, 228
- libm functions, 227
- libm.a, 226
- libm.so, 226
- libsunmath support, 234
- libsunmath.a, 226
- matherr() exception-handling function, 232
- Pascal header files, 225
- SPARC libraries, 230
- memory, out of, 221
- -misalign option to pc command, 34
- module
- heading, 80
- source files, 79
- unit, 73
- -mt option to pc command, 34, 238
- multiprocessor systems, 240
- multithread library, 237
- thr_setconcurrency function, 240
- multithreading
- benefits, 239
- libpc_mt library, 34
- lightweight processes, LWPs, 239
- programming introduction, 237
- Solaris threads, 239, 242
- UNIX processes, 239
- See also threads
- mutex_lock(3T), 241
- mutex_unlock(3T), 241
- mv command, 9
N
- -native option to pc command, 34
- -nolib option to pc command, 35
- -nolibmil option to pc command, 35
- %nolist directive, 270
- -non_init option to pc command, 35 to 39
- nonstandard floating point, 28
- -noqueue licensing option, 5, 39
- -notrace option to pc command, 39
O
- -O option to pc command, 40
- -o option to pc command, 9, 42
- object code optimizer, 40
- object file, 18
- operating environment, See Solaris 2.x operating system
- operator
- and, 42
- or, 42
- redirection (>), 11
- options
- order of processing, 23
- to pc command, 23 to 70
- order of processing, options, 23
- out of memory error, 221
- output, 10 to 13
P
- -P option to pc command, 40, 42
- -p option to pc command, 42
- panics, compiler, 221
- parameter passing
- C and Pascal, 97
- C++ and Pascal, 155
- FORTRAN and Pascal, 171
- parameters
- as pointers to procedures with C, 136
- passed by address, 98, 172, 190, 201
- passed by reference, 98, 172, 190, 201
- passed by reference between C and Pascal, 121 to 133
- passed by value
- between Pascal and C, 134 to 135
- between Pascal and C++, 155
- between Pascal and FORTRAN, 184, 201 to 206
- value conformant array, 105, 118, 128, 197
- value conformant array passed between Pascal and FORTRAN, 186
- var, 99, 121 to 133, 172, 190 to 201
- Pascal program
- how to compile, 8, 13
- how to list, 33
- how to run, 9 to 13
- how to write, 7
- pc command, 2, 7, 8, 11, 17 to 70
- -a option, 24
- -B option, 24
- -b option, 25
- -C option, 25
- -c option, 25
- -calign option, 26
- -cg89 option, 26
- -cg92 option, 26
- -cond option, 26, 257
- -config option, 27, 254, 260, 264
- -D option, 27
- -dalign option, 27
- -dn option, 27
- -dryrun option, 28
- -dy option, 28
- -fast option, 28
- -flags option, 28, 31
- -fnonstd option, 28
- -fns option, 29
- -fround=r option, 29
- -ftrap=t option, 29
- -G option, 30
- -G option, 30
- -g option, 30
- -H option, 31, 53
- -help option, 28, 31
- -hname option, 31
- -I option, 31
- -i option, 32
- -keeptmp option, 32
- -Kpic and -KPIC options, 43
- -L option, 32
- -l option, 33, 269
- -Ldirectory option, 33
- -libmieee option, 33
- -libmil option, 33
- list of options, 23 to 70
- -llib option, 34
- -misalign option, 34
- -mt option, 34, 238
- -native option, 34
- -nolib option, 35
- -nolibmil option, 35
- -non_init option, 35
- -noqueue option, 39
- -notrace option, 39
- -O option, 40
- -o option, 9, 42
- -P option, 40, 42
- -p option, 42
- -pg option, 42
- -PIC option, 43
- -pic option, 43
- -Qoption, 44
- -qp option, 44
- -Qpath option, 44
- -Qproduce option, 44
- -Rpath option, 45
- -Rw option, 45
- -S option, 50
- -s option, 50
- -s0 and -s1 options, 53
- -sb option, 50
- -sbfast option, 50
- -tc option, 51
- -temp option, 51
- -time option, 52
- -U option, 53
- -V option, 17
- -v option, 53
- -VO and -V1 options, 53
- -w option, 53
- -xarch=a option, 53
- -xcache=c option, 57
- -xchip=c option, 58
- -xF option, 59
- -xildoff option, 60
- -xildon option, 60
- -xl option, 60, 253
- -xlibmopt option, 61
- -xlicinfo option, 61
- -xMerge option, 61
- -xnolibmopt option, 61
- -xregs=r option, 64
- -xs option, 64
- -xsafe=mem option, 65
- -xspace option, 65
- -xtarget=t option, 65
- -Z option, 70
- -ztext option, 70
- pc0, 18, 44
- pc3, 18, 44
- -pg option to pc command, 42
- -PIC option to pc command, 43
- -pic option to pc command, 43
- pointer range checking, 31
- preprocessor, 31
- cpp(1), 27, 44
- cppas, 26, 27, 44
- private variable, 77, 84
- procedure
- and function type errors, 215
- extern option, 90, 92
- external, 92
- linelimit, 25
- type errors, 215
- write, 50
- program
- breakup of a, 71
- logic errors, 219
- source files, 79
- unit, 72
- programming, multi-thread, 237
- public variable, 77, 84
Q
- -Qoption to pc command, 44
- -qp option to pc command, 44
- -Qpath option to pc command, 44
- -Qproduce option to pc command, 44
- queuing for a license, 5
- QUIT errors, 213
R
- range check on pointers, 31
- reading and writing scalars, errors in, 216
- real numbers, errors, 210
- records, variant, 112, 130, 199
- redirecting input and output, 11 to 13
- reference parameters, 98, 121, 133, 173
- replacements in the case of errors, 211
- -Rpath option to pc command, 45
- running a Pascal program, 9 to 13
- runtime errors, 221 to 224
- -Rw option to pc command, 45
- rw_rdlock(3T), 242
- rw_unlock(3T), 242
- rw_wrlock(3T), 242
- rwlock(3T) function, 242
- rwlock_init(3T), 242
S
- -S option to pc command, 50
- -s option to pc command, 50
- -s0 and -s1 options, 53
- -sb option to pc command, 50
- -sbfast option to pc command, 50
- scalar errors, 215
- sema_init(3T) function, 242
- sema_post(3T) function, 242
- sema_wait(3T) function, 242
- semantic errors, 214
- semaphores, See signaling
- separate compilation, 79 to 92
- define variable, 80
- extern variable, 80
- module source files, 80
- program source files, 80
- separately compiled units, 72
- set types, 97, 114, 171, 183
- shared libraries, 24
- sharing
- routines among units, 80 to 92
- variables among units, 75 to 77, 80 to 90
- variables and routines across multiple units
- using define variable, 86
- using extern variable, 90
- using include files, 82, 88
- using public var declarations, 84
- with -xl, 84
- without -xl, 81
- shortreal, 157, 186
- signaling, 241
- Dijkstra semaphores, 242
- sema_init(3T), 242
- sema_post(3T), 242
- sema_wait(3T), 242
- semaphore(3T), 242
- sizes of types, 169
- %slibrary directive, 271
- source
- code, 44
- file, 42
- SPARC math libraries, 230
- standard
- input file, 10
- output file, 10
- Pascal, Level 0 and 1, 1, 50
- statement
- #define, 27
- assert, 25
- stdin, 10
- stdout, 10
- string errors, 210
- symbol
- errors, 212
- table for dbx, 64
- syntax errors and recovery, 209 to 211
T
- -tc option to pc command, 51
- tcov(1) utility, 24
- -temp option to pc command, 51
- text editor
- textedit, 3
- vi, 3
- thr_setconcurrency function, 240
- thread
- blocking, 242
- components, 239
- creation, 240
- creation facilities, 239
- thr_create(3T) function, 239
- thr_exit(3T) function, 239
- thr_join(3T) function, 239
- thr_self(3T) function, 239
- critical section, 241
- multithread library
- thr_setprio function, 240
- unblocking, 242
- waiting, 242
- threads
- control using LWPs, 239
- scheduling, 240
- synchronization, 240
- See also multithreading
- -time option to pc command, 52
- type
- equivalence, errors, 218
- shortreal, 157, 186
- sizes, See sizes of types
- types
- compatible in C and Pascal, 94
- compatible in C++ and Pascal, 142
- compatible in FORTRAN and Pascal, 169
- enumerated, 96, 170
- incompatible, 214
- set, 97, 114, 171, 183
U
- -U option to pc command, 53
- uninitialized variable error, 220
- units
- compiling and linking, 73
- introductory information, 71 to 77
- separately compiled, 72
- sharing routines, 80 to 92
- sharing variables, 75 to 77, 80 to 90
- unreachable statements, errors, 219
- unused item errors, 220
- uppercase characters, 32, 50
- /usr/include, 32
V
- -V option to pc command, 17
- -v option to pc command, 53
- value conformant array parameters, 105, 118, 128, 186, 197
- value parameters
- with C, 134, 135
- with C++, 155
- with FORTRAN, 185, 201
- %var directive, 255, 266, 271
- variable
- condition(3T), 241
- conditional, 27, 241, 254
- define, 86
- initialization of and errors, 220
- parameters, 98
- with C, 121, 133
- with C++, 164
- with FORTRAN, 172
- private, 77, 84
- public, 77, 84
- variables and routines, sharing across multiple units
- using define
- variable, 86
- using define declaration, 87
- using extern variable, 90
- using include files, 82, 88
- using public var declarations, 84
- without -xl, 81
- variant records, 112, 130, 199
- vi text editor, 3
- -VO and -V1 options to pc command, 53
W
- -w option to pc command, 53
- %warning directive, 271
- warning diagnostic, 53
- for -non_init and - Rw options, 38
- for -non_init option, 35, 36, 38
- -non_init option, early warnings versus late warnings, 35
- write procedure, 50
- writing a Pascal program, 7
- writing scalars, errors in, 216
X
- -xarch=a option to pc command, 53
- -xcache=a option to pc command, 57
- -xchip=c option to pc command, 58
- -xF option to pc command, 59
- -xildoff option to pc command, 60
- -xildon option to pc command, 60
- -xl option to pc command, 60, 253
- -xlibmopt option to pc command, 61
- -xlicinfo licensing option, 5
- -xlicinfo option to pc command, 61
- -xMerge option to pc command, 61
- -xnolibmopt option to pc command, 61
- -xregs=r option to pc command, 64
- -xs option to pc command, 64
- -xsafe=mem option to pc command, 65
- -xspace option to pc command, 65
- -xtarget=t option to pc command, 65
Z
- -Z option to pc command, 70
- -ztext option to pc command, 70