HP Pascal/iX Programmer's Guide : COPYRIGHT NOTICE [ HP Pascal/iX Programmer's Guide ] MPE/iX 5.0 Documentation
HP Pascal/iX Programmer's Guide
HP Pascal/iX Programmer's Guide
Printed in U.S.A.
HP Part No. 31502-90002
Edition Sixth Edition
E0692
________________________________________________________________________
|The information contained in this document is subject to change |
|without notice. |
| |
|HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS |
|MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard |
|shall not be liable for errors contained herein or for incidental or |
|consequential damages in connection with the furnishing, performance, |
|or use of this material. |
| |
|Hewlett-Packard assumes no responsibility for the use or reliability |
|of its software on equipment that is not furnished by Hewlett-Packard.|
| |
|This document contains information which is protected by copyright. |
|All rights are reserved. Reproduction, adaptation, or translation |
|without prior written permission is prohibited, except as allowed |
|under the copyright laws. |
| |
| |
| |
| Restricted Rights Legend |
| |
| |
|Use, duplication or disclosure by the U.S. Government is subject to |
|restrictions as set forth in subparagraph (c) (1) (ii) of the |
|Rights in Technical Data and Computer Software clause at DFARS |
|252.227-7013. |
| |
| |
| |
| HEWLETT-PACKARD COMPANY |
| 3000 Hanover Street |
| Palo Alto, California 94304 U.S.A. |
| |
| |
|Rights for non-DOD U.S. Government Departments and Agencies are set |
|forth in |
|FAR 52.227-19(c)(1,2). |
________________________________________________________________________
Copyright (c) 1987 - 1992 by Hewlett-Packard Company
Printed June 1992
Printing History
New editions are complete revisions of the manual. Update packages,
which are issued between editions, contain additional and replacement
pages to be merged into the manual by the customer. The dates on the
title page change only when a new edition or a new update is published.
No information is incorporated into a reprinting unless it appears as a
prior update; the edition does not change when an update is incorporated.
The software code printed alongside the date indicates the version level
of the software product at the time the manual or update was issued.
Many product updates and fixes do not require manual changes and,
conversely, manual corrections may be done without accompanying product
changes. Therefore, do not expect a one to one correspondence between
product updates and manual updates.
First Edition March 1987 MPE XL: 31502A.01.01
HP-UX: 31502A.00.03
Second Edition November 1987 MPE XL: 31502A.01.06
HP-UX: 92431A.01.09
Third Edition January 1988 MPE XL: 31502A.01.06
HP-UX: 92431A.01.12
Fourth Edition October 1988 MPE XL: 31502A.01.19
HP-UX: 92431A.03.04
Fifth Edition January 1991 MPE XL: 31502A.03.10
HP-UX: 92431A.08.00
Sixth Edition June 1992 MPE/iX: 31502A.04.05
HP-UX: 92431A.09.00
Preface
MPE/iX, Multiprogramming Executive with Integrated POSIX, is the latest
in a series of forward-compatible operating systems for the HP 3000 line
of computers.
In HP documentation and in talking with HP 3000 users, you will encounter
references to MPE XL, the direct predecessor of MPE/iX. MPE/iX is a
superset of MPE XL. All programs written for MPE XL will run without
change under MPE/iX. You can continue to use MPE XL system documentation,
although it may not refer to features added to the operating system to
support POSIX (for example, hierarchical directories).
Finally, you may encounter references to MPE V, which is the operating
system for HP 3000s, not based on the PA-RISC architecture. MPE V
software can be run on the PA-RISC (Series 900) HP 3000s in what is known
as compatibility mode.
This HP Pascal/iX Programmer's Guide for the Hewlett-Packard HP Pascal/iX
and HP Pascal/HP-UX programming languages is intended for programmers
with at least six months of Pascal programming experience, but no HP
Pascal/iX or HP Pascal/HP-UX programming experience. It discusses
selected HP Pascal/iX and HP Pascal/HP-UX topics in detail, and explains
statement interaction where necessary. It does not explain every feature
of HP Pascal/iX or HP Pascal/HP-UX, as the HP Pascal/iX Reference Manual
does.
Throughout this manual, the term HP Pascal refers to both HP Pascal/iX
and HP Pascal/HP-UX. The following is a short description of each chapter
and appendix.
Chapter 1 Describes HP Pascal/iX and HP Pascal/HP-UX and
explains their relationship to HP Standard Pascal and
its subsets.
Chapter 2 Describes HP Pascal program structure in terms of
syntax and compilation units, and explains how your
program can interface with its external environment.
Chapter 3 Explains how program input/output works.
Chapter 4 Gives the ranges of the predefined data types of HP
Pascal and explains the types which HP Pascal does
not share with older Pascal implementations.
Chapter 5 Explains how HP Pascal allocates space for and aligns
static data structures.
Chapter 6 Explains dynamically allocated HP Pascal data
structures.
Chapter 7 Discusses HP Pascal parameters.
Chapter 8 Explains procedure options, which allow routines to
have optional parameters and default parameter
values.
Chapter 9 Explains how your program can use external routines.
Chapter 10 Explains how your program can use intrinsics.
Chapter 11 Explains how to write error recovery code that allows
your program to handle its own run-time errors.
Explains how to debug your program.
Chapter 12 Explains how to use the optimizer to improve your
program.
Appendix A Explains how HP Pascal/iX works on the MPE/iX
operating system.
Appendix B Explains how HP Pascal/HP-UX works on the HP-UX
operating system.
Refer to the following manuals for further information on HP Pascal:
* HP Pascal/iX Reference Manual (31502-90001)
* HP Pascal/XL Migration Guide (31502-90004)
This manual also refers to the following non-HP Pascal manuals:
* ALLBASE/SQL Pascal Application Programming Guide (36216-90007)
* HP C Programmer's Guide (92434-90002)
* HP Link Editor/XL Reference Manual (32650-90030)
* HP System Dictionary/XL General Reference Manual (32256-90004)
* HP TOOLSET/XL Reference Manual (36044-90001)[REV BEG]
* HP-UX Floating-Point Guide (B2355-90024)[REV END]
* Introduction to MPE XL for MPE V Programmers (30367-90005)
* MPE/iX Commands Reference Manual, Volumes 1 and 2 (32650-90003
and 32650-90364)
* MPE/iX Intrinsics Reference Manual (32650-90028)
* MPE/iX Symbolic Debugger User's Guide (31508-90003)
* MPE/iX System Debug Reference Manual (32650-90013)
* Programming on HP-UX (B2355-90010)
* Switch Programming Guide (32650-90014)
* Trap Handling Programmer's Guide (32650-90026)
* TurboIMAGE/XL Reference Manual (30391-90001)
* Using VPLUS/V: Introduction to Forms Designs (32209-90004)
If you have suggestions for improving this manual, please send us the
Reader Comment Card, located at the front of this manual.
Conventions
UPPERCASE In a syntax statement, commands and keywords are
shown in uppercase characters. The characters must
be entered in the order shown; however, you can enter
the characters in either upper or lowercase. For
example:
COMMAND
can be entered as any of the following:
command Command COMMAND
It cannot, however, be entered as:
comm com_mand comamnd
italics In a syntax statement or an example, a word in
italics represents a parameter or argument that you
must replace with the actual value. In the following
example, you must replace FileName with the name of
the file:
COMMAND FileName
punctuation In a syntax statement, punctuation characters (other
than brackets, braces, vertical bars, and ellipses)
must be entered exactly as shown. In the following
example, the parentheses and colon must be entered:
(FileName):(FileName)
{ } In a syntax statement, braces enclose required
elements. When several elements are stacked within
braces, you must select one. In the following
example, you must select either ON or OFF:
COMMAND {ON }
{OFF}
[ ] In a syntax statement, brackets enclose optional
elements. In the following example, OPTION can be
omitted:
COMMAND FileName [OPTION]
When several elements are stacked within brackets,
you can select one or none of the elements. In the
following example, you can select OPTION or Parameter
or neither. The elements cannot be repeated.
COMMAND FileName [OPTION ]
[Parameter]
Conventions (continued)
[...] In a syntax statement, horizontal ellipses enclosed
in brackets indicate that you can repeatedly select
the element(s) that appear within the immediately
preceding pair of brackets or braces. In the example
below, you can select Parameter zero or more times.
Each instance of Parameter must be preceded by a
comma:
[,Parameter][...]
In the example below, you only use the comma as a
delimiter if Parameter is repeated; no comma is used
before the first occurrence of Parameter:
[Parameter][,...]
|...| In a syntax statement, horizontal ellipses enclosed
in vertical bars indicate that you can select more
than one element within the immediately preceding
pair of brackets or braces. However, each particular
element can only be selected once. In the following
example, you must select A, AB, BA, or B. The
elements cannot be repeated.
{A} |...|
{B}
... In an example, horizontal or vertical ellipses
indicate where portions of an example have been
omitted.
triangle In a syntax statement, the space symbol triangle
shows a required blank. In the following example,
Parameter and Parameter must be separated with a
blank:
(Parameter) triangle (Parameter)
The symbol indicates a key on the keyboard. For
example, RETURN represents the carriage return key.
base prefixes The prefixes %, #, and $ specify the numerical base
of the value that follows:
%num specifies an octal number.
#num specifies a decimal number.
$num specifies a hexadecimal number.
If no base is specified, decimal is assumed.
Pascal Specific Conventions
The conventions followed in this manual are summarized below:
For Text:
* The term PAC is used for the type PACKED ARRAY OF CHAR with the
lower bound equal to 1.
* Reserved words and directives are in all uppercase letters.
Examples: BEGIN, REPEAT, FORWARD
* Standard identifiers are in all lowercase letters.
Examples: readln, maxint, text
* General information concerning an area of programming (topic)
appears as a heading with initial capitalization. All headings
that are not reserved words or standard identifiers appear with
initial capitalization.
For Syntax Diagrams:
* Syntactic entities that are to be replaced by user-supplied
entities are represented by sequences of lowercase letters and
embedded underscore characters (_).
Example: identifier
* Keywords, predefined symbolic names and special symbols that must
be supplied exactly as given are shown in apostrophes. Usually,
letters may be entered in uppercase or lowercase.
Example: 'IMPORT', ','
* The diagrams are in the form of lines with directional arrows,
known as "railroad tracks." Alternative paths are indicated by
switches in the tracks.
Example:
NOTE Some diagrams and tables have a number in the lower left or right
corner, such as the number LG200009_036 in the diagram above. This
number is not part of the diagram or table. It just identifies the
artwork.
MPE/iX 5.0 Documentation