HP C Programmer's Guide : COPYRIGHT NOTICE [ HP C Programmer's Guide ] MPE/iX 5.0 Documentation
HP C Programmer's Guide
HP C Programmer's Guide
Printed in U.S.A.
HP Part No. 92434-90002
Edition E0194
________________________________________________________________________
|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 that 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)HEWLETT-PACKARD COMPANY, 1986, 1987, 1988, 1992, 1994
Printed January 1994
Printing History
New editions are complete revisions of the manual. The dates on the
title page change only when a new edition is published.
The software code printed alongside the data 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 Nov 1986
Second Edition Nov 1987 MPE/XL: 31506A.00.02
HP-UX: 92453-01A.00.09
Update 1 Oct 1988 MPE/XL: 31506A.01.21
HP-UX: 92453-01A.03.04
Third Edition August 1992 MPE/iX: 31506A.04.01
HP-UX: 92453-01A.09.17
Fourth Edition January 1994 MPE/iX: 31506A.04.01
HP-UX: 92453-01A.09.61
Preface
The HP C Programmer's Guide contains a detailed discussion of selected C
topics for the HP 3000 Series 900 and HP 9000 Series 700/800 computer
systems. This manual is intended for experienced programmers who are
familiar with HP systems, data processing concepts, and the C programming
language. The manual does not discuss every feature of C. For a complete
description of the C programming language, refer to the HP C/HP-UX
Reference Manual or the HP C/iX Reference Manual.
This manual is organized as follows:
Chapter 1 Introduction to HP C
Introduces HP C.
Chapter 2 Storage and Alignment Comparisons
Compares HP C storage and alignment on different
systems.
Chapter 3 Calling Other Languages and MPE/iX Intrinsics
Describes how to call other languages from HP C,
and how to call MPE/iX intrinsics.
Chapter 4 Optimizing HP C Programs
Describes how to use the optimizer.
Chapter 5 Programming for Portability
Describes how to make new programs easily
transportable among HP systems.
Chapter 6 Migrating C Programs to HP-UX
Discusses issues for migrating C language programs
from VAX computers and HP 9000 Series 300/400 and
500 computers to HP 9000 Series 700/800 computers.
Chapter 7 Using C Programming Tools
Discussing various C programming tools.
Additional Documentation
Refer to the following materials for further information on C language
programming:
American National Standard for Information Systems--Programming
Language--C, ANSI/ISO 9899-1990.
HP C/iX Reference Manual (31506-90005)--This manual is the reference for
programming in C on HP 3000 MPE/iX systems.
HP C/iX Library Reference Manual (30026-90001)--This manual describes the
standard C library functions, math library functions, and other library
functions on HP 3000 MPE/iX systems.
HP C/HP-UX Reference Manual (92453-90024)--This manual is the reference
for programming in C on the HP 9000 Series 700/800 systems.
HP FORTRAN/9000 Programmer's Guide (B2408-90009)--This manual explains
how to call C programs from FORTRAN on HP-UX.
HP FORTRAN 77/iX Programmer's Guide (31501-90011)--This manual explains
how to call C programs from FORTRAN on MPE/iX.
HP Pascal/HP-UX Programmer's Guide (92431-90006)--This manual describes
how to call C programs from Pascal on HP-UX systems.
HP Pascal/iX Programmer's Guide (31502-90002)--This manual describes how
to call C programs from Pascal on MPE/iX systems.
COBOL/HP-UX Operating Manual (B2433-90009)--This manual provides
information on calling C subprograms from COBOL programs on HP-UX. It
also explains how to call COBOL subprograms from C.
HP COBOL II/XL Programmer's Guide (31500-90002)--This manual describes
how to call C subprograms from COBOL programs on MPE/iX.
HP-UX Reference (B2355-90033)--This manual is a three volume reference
that documents commands, system calls, file formats, device files, and
other HP-UX related topics.
MPE/iX Intrinsics Reference Manual (32650-90028)--This manual describes
the set of intrinsics available on the MPE/iX operating system and tells
you how to communicate with MPE/iX programmatically.
Programming on HP-UX (B2355-90026)--This manual describes programming in
general on HP-UX. For example, it covers linking, loading, shared
libraries, and several other HP-UX programming features.
SPL to HP C/XL Migration Guide (30231-90001)--This manual describes how
to convert SPL programs to HP C/iX.
HP-UX Floating-Point Guide (B2355-90024)--This manual describes the IEEE
floating-point standard, the HP-UX math libraries on Series 700/800
systems, performance tuning related to floating-point routines, and
floating-point coding techniques that can affect application results.
Conventions
NOTATION DESCRIPTION
UPPERCASE Within syntax descriptions, characters in uppercase must
be entered in exactly the order shown, though you can
enter them in either uppercase or lowercase. For
example:
SHOWJOB
Valid entries: showjob ShowJob SHOWJOB
Invalid entries: shojwob ShoJob SHOW_JOB
italics Within syntax descriptions, a word in italics represents
a formal parameter or argument that you must replace
with an actual value. In the following example, you
must replace filename with the name of the file you want
to release:
RELEASE filename
punctuation Within syntax descriptions, punctuation characters
(other than brackets, braces, vertical parallel lines,
and ellipses) must be entered exactly as shown.
{ } Within syntax descriptions, braces enclose required
elements. When several elements within braces are
stacked, you must select one. In the following example,
you must select ON or OFF:
SETMSG { ON }
{ OFF}
NOTATION DESCRIPTION
[ ] Within syntax descriptions, brackets enclose optional
elements. In the following example, brackets around
,TEMP indicate that the parameter and its delimiter are
optional:
PURGE {filename} [,TEMP]
When several elements with brackets are stacked, you can
select any one of the elements or none. In the
following example, you can select devicename or
deviceclass or neither:
SHOWDEV [ devicename ]
[ deviceclass]
[...] Within syntax descriptions, a horizontal ellipsis
enclosed in brackets indicates that you can repeatedly
select elements that appear within the immediately
preceding pair of brackets or braces. In the following
example, you can select itemname and its delimiter zero
or more times. Each instance of itemname must be
preceded by a comma:
[,itemname][...]
If a punctuation character precedes the ellipsis, you
must use that character as a delimiter to separate
repeated elements. However, if you select only one
element, the delimiter is not required. In the
following example, the comma cannot precede the first
instance of itemname:
[itemname][,...]
NOTATION DESCRIPTION
|...| Within syntax descriptions, a horizontal ellipsis
enclosed in parallel vertical lines indicates that you
can select more than one element that appears within the
immediately preceding pair of brackets or braces.
However, each element can be selected only one time. In
the following example, you must select ,A or ,B or ,A,B
or ,B,A:
{ ,A}|...|
{ ,B}
If a punctuation character precedes the ellipsis, you
must use that character as a delimiter to separate
repeated elements. However, if you select only one
element, the delimiter is not required. In the
following example, you must select A or B or A,B or B,A
(the first element is not preceded by a comma):
{ A}|,...|
{ B}
... Within examples, horizontal or vertical ellipses
indicate where portions of the example are omitted.
_ Within syntax descriptions, the space symbol _ shows a
required blank. In the following example, you must
separate modifier and variable with a blank:
SET[(modifier)]_(variable);
The symbol indicates a key on the terminal's keyboard.
For example, RETURN indicates the carriage return key.
CTRL char CTRL char indicates a control character. For example,
CTRL Y means you have to press the Y key while holding
down the CTRL key.
NOTATION DESCRIPTION
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.
When no base is specified, decimal is assumed.
Bit (bit:length) When a parameter contains more than one piece of data
within its bit field, the different data fields are
described in the format Bit (bit:length), where bit is
the first bit in the field and length is the number of
consecutive bits in the field. For example, Bits (13:3)
indicates bits 13, 14, and 15:
computer font Denotes information displayed by the computer (for
example, login:), file names (for example,
/usr/include/stdio.h), and command names (for example,
vi).
underlining Denotes text you must type explicitly:
cc -c prog.c -lm
MPE/iX 5.0 Documentation