HPlogo HP C++ Programmer's Guide: HP 9000 Series Workstations and Servers

Preface

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

The HP C++ Programmer's Guide was written to assist C and C++ programmers execute and debug C++ programs on HP 9000 Series workstations and servers. Although it is not intended as a reference source on the C++ language, you will find a brief overview of the language in Chapter 1 “Overview of HP C++”. The HP C++ implementation is based on version 3.0 of the C++ translator as developed by USL.

If you are relatively new to C, C++, HP-UX, or the HP Symbolic Debugger, you should become familiar with these languages, systems, and products before using this Guide.

This manual contains the following chapters:

Chapter 1 “Overview of HP C++” — Overview of HP C++ introduces you to HP C++, providing background information on object-oriented programming and previous releases of C++.

Chapter 2 “The HP C++ Preprocessor” — The HP C++ Preprocessor presents information about HP C++ preprocessor operation.

Chapter 3 “Compiling and Executing HP C++ Programs” — Compiling and Executing HP C++ Programs describes HP C++ compiler options, system library and header files, and a comprehensive programming example.

Chapter 4 “Optimizing HP C++ Programs” — Optimizing HP C++ Programs describes how your program can be optimized for improved efficiency.

Chapter 5 “Inter-Language Communication” — Inter-Language Communication describes guidelines for linking HP C++ modules with modules written in HP C, HP Pascal, and HP FORTRAN 77.

Chapter 6 “HP Specific Features of lex and yacc” — HP Specific Features of lex and yacc provides a list of HP specific features of the lex and yacc utilities.

Online Help. The HP C++ Programmer's Guide is also available in an online help format. Currently, it is accessible with the helpprint command on X and non-X displays, and may also be accessed be selecting the ? icon on the HP Vue front panel of X displays.

Users with Version A.10.22 or later may also use the command

CC +help

to access the HP C++ Online Programmer's Guide.

The online documentation provides the most comprehensive and current documentation and also provides information on getting help with error messages.

Conventions

NOTATION

DESCRIPTION

text

Represents literals; they are to be entered exactly as shown.

italics

Within syntax statements, 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 compile:

CC filename

punctuation

Within syntax statements, punctuation characters (other than brackets, braces, vertical parallel lines, and ellipses) must be entered exactly as shown.

{ }

Within syntax statements, braces indicate that you must choose one of the listed items. In the following example, you must specify either ON or OFF:

#pragma OPTIMIZE [ON ] [OFF ]

[ ]

Within syntax statements, brackets enclose optional elements. In the following example, brackets around optionarg indicate that the argument is optional:

-optionname[optionarg]

[ | ]

A vertical bar within brackets indicates that you can choose either or both of the items separated by the vertical bar. In the following example, you can specify either options or files or both:

CC [ options | files ]

[...]

Within syntax statements, 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][,...] 

... . . .

Within examples, horizontal or vertical ellipses indicate where portions of the example are omitted.

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:

First EditionMarch 1990B1691A.02.00 (Series 300)
  92501A.02.00 (Series 800)
   
Second EditionDecember 1990B2400A.02.10 (Series 300/400)
  B2404A.02.10 (Series 600/800)
   
Third EditionAugust 1992B2400A.03.00 (Series 300/400, HP-UX 8.0)
  B2402A.03.00 (Series 700, HP-UX 8.0)
  B2404A.03.00 (Series 800, HP-UX 8.0)
   B2400A.03.05 (Series 300/400, HP-UX 9.0)
  B2402A.03.05 (Series 700, HP-UX 9.0)
  B2404A.03.05 (Series 800, HP-UX 9.0)
Fourth EditionJune 1996HP-UX HP C++ A.03.72 and A.10.22

You may send any suggestions for improvements in this manual to:

Languages Information Engineering Manager Hewlett-Packard Company Mailstop 42UD 11000 Wolfe Road Cupertino CA 95014-9804

© Hewlett-Packard Development Company, L.P.