HP C/iX Reference Manual : COPYRIGHT NOTICE [ HP C/iX Reference Manual ] MPE/iX 5.0 Documentation
HP C/iX Reference Manual
HP C/iX Reference Manual
Printed in U.S.A.
HP 3000 Series 900 Computers
HP Part No. 31506-90005
Edition Second 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 proprietary information which is protected by |
|copyright. All rights are reserved. No part of this document may be |
|photocopied, reproduced or translated to another language without the |
|prior written consent of Hewlett-Packard Company. |
| |
|Restricted Rights Legend. Use, duplication or disclosure by the U.S. |
|Government is subject to restrictions as set forth in paragraph (c) |
|(1) (ii) of the Rights in Technical Data and Computer Software clause |
|in 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 as set|
|forth in FAR 52.227-19(c) (1,2). |
________________________________________________________________________
(c) Copyright 1990 and 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 April 1990 31506A.02.14
Second Edition June 1992 31506A.04.01
[REV BEG]
Changes for This Edition
This version of the manual includes information on the following new
compiler enhancements:
* HP_ALIGN data alignment pragma--Aligns data on a Series 900 system
according to the 16-bit alignment of MPE/V systems.
* +u compiler option--Forces the compiler to use half-word addresses
with pointers.
* +e compiler option--Allows the use of HP C extensions to ANSI C.
* +Obbnum compiler option--Specifies the maximum number of basic
blocks in a procedure to be optimized at level 2.
[REV END]
Preface[REV BEG]
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.
[REV END]
This manual presents reference information on the HP C programming
language, as implemented on HP3000 Series 900 computers. It presents
information specific to writing and executing HP C programs on the MPE/iX
operating system. This manual is intended for experienced C programmers
who are familiar with HP computer systems.
Manual Organization
This manual is organized as follows:
Chapter 1 Introduces the HP C programming language.
Chapter 2 Presents the lexical elements of HP C, including
tokens, keywords, identifiers, constants,
punctuation, and comments.
Chapter 3 Describes HP C data types, declarations, type
specifiers, storage-class specifiers, structure and
union specifiers, enumerations, type names, and
initialization.
Chapter 4 Explains type conversions that occur when different
data types are used within a program.
Chapter 5 Describes how to form expressions in HP C and
includes information on operators and operator
precedence.
Chapter 6 Provides details on each of the HP C statements.
Chapter 7 Describes preprocessor directives that function as
compiler control lines.
Chapter 8 Describes how to compile and run an HP C program on
the MPE/iX operating system.
Chapter 9 Presents information specific to programming in HP
C on 900 Series HP3000 computers.
Chapter 10 Describes the use of intrinsic functions in HP C/iX
programs.
Chapter 11 Explains the listing format of the HP C compiler
and describes facilities that can be used to define
characteristics of the format.
Appendix A Lists the HP C/iX compile-time error messages,
suggests possible causes for the errors, and
recommends actions to correct the errors.
Appendix B Lists the HP C/iX run-time messages, possible
causes, and actions to correct errors.
Appendix C Includes the HP C syntax as it is presented in the
manual.
Additional Documentation
The following manuals are referenced in this manual:
-------------------------------------------------------------------------------------------
| |
| Manual Title Manual |
| Part Number |
| |
-------------------------------------------------------------------------------------------
| |
| HP C Programmer's Guide 92434-90002 |
| |
| HP C/iX Library Reference Manual 30026-90001 |
| |
| HP Pascal Programmer's Guide 31502-90002 |
| |
| MPE/iX Commands Reference Manual Volume 1 32650-90003 |
| |
| MPE/iX Commands Reference Manual Volume 2 32650-90364 |
| |
| MPE/iX Intrinsics Reference Manual 32650-90028 |
| |
-------------------------------------------------------------------------------------------
The HP C Programmer's Guide explains how to program in HP C and gives
detailed descriptions of storage and alignment, the optimizer, HP C
debugging, and programming for efficiency and portability.
The HP C/iX Library Reference Manual presents standard library functions
and math functions available on HP C/iX.
The HP Pascal Programmer's Guide explains HP Pascal topics in detail.
The two volume MPE/iX Commands Reference Manual describes the MPE
commands that allow you to initiate, control, and terminate the
processing of programs and to request various system operations.
The MPE/iX Intrinsics Reference Manual describes the set of intrinsics
available on the MPE operating system and explains how to communicate
with MPE programmatically.
This manual makes frequent reference to the American National Standard
for Programming Language C, X3.159. For information on ordering the
standard, contact the American National Standards Institute.
Conventions
This manual uses a variation of the Backus-Naur form to describe the HP C
language. The language is described in terms of syntactic categories
(nonterminals). Syntax descriptions define the syntactic categories.
The ::= symbol following a syntactic category introduces its definition.
Alternate definitions are listed on separate lines unless preceded by
"one of the following" or an equivalent expression.
A definition of a syntactic category can be recursive. For example,
expression ::=
assignment-expression
expression, assignment-expression
The second alternate definition for expression contains expression. This
allows for expression to consist of any number of assignment-expressions,
separated by commas.
C statements are described generally, and then each statement is covered
separately. All syntactic categories are fully defined.
NOTATION DESCRIPTION
nonitalics Within syntax descriptions, nonitalicized words
represent literals. Enter them exactly as shown. This
includes nonitalicized braces and brackets appearing
within syntactic descriptions. Nonitalicized words and
punctuation characters appear in computer font. In the
following example, you must provide both the keyword and
the trailing semicolon:
break;
italics Within syntax descriptions, italicized words denote
argument names, program names, or strings that you must
replace with an appropriate value. In the following
example, you must replace identifier with the name of a
label you want the program to transfer execution to at
this point:
goto identifier;
[ ] Within syntax descriptions, italicized brackets surround
optional elements. For example, the expression in the
return statement is optional:
return [expression];
vertical ellipses Within examples, vertical ellipses may show where
portions of the example were omitted.
MPE/iX 5.0 Documentation