Conventions used in this document

Typographical conventions

The following table explains the typographical conventions used in this document.

Table 1. Typographical conventions
Typeface Indicates Example
bold Commands, executable names, compiler options and pragma directives If you specify -O3, the compiler assumes -qhot=level=0. To prevent all HOT optimizations with -O3, you must specify -qnohot.
italics Parameters or variables whose actual names or values are to be supplied by the user. Italics are also used to introduce new terms Make sure that you update the size parameter if you return more than the size requested.
monospace Programming keywords and library functions, compiler built-in functions, examples of program code, command strings, or user-defined names If one or two cases of a switch statement are typically executed much more frequently than other cases, break out those cases by handling them separately before the switch statement.
UPPERCASE bold Fortran programming keywords, statements, directives, and intrinsic procedures The ASSERT directive applies only to the DO loop immediately following the directive, and not to any nested DO loops.
lowercase bold Fortran lowercase programming keywords and library functions, compiler intrinsic procedures, file and directory names, examples of program code, command strings, or user-defined names If you specify -O3, the compiler assumes -qhot=level=0. To prevent all HOT optimizations with -O3, you must specify -qnohot.

Syntax diagrams

Throughout this document, diagrams illustrate XL C/C++ or XL Fortran syntax. This section will help you to interpret and use those diagrams.

Sample syntax diagrams

The following syntax diagram example shows the syntax for the #pragma comment directive.

Read syntax diagramSkip visual syntax diagram    (1)     (2)          (3)           (4)     (5)   .-compiler--------------------------------------------------.    (9)  (10)
>>--------#-------pragma-------comment-------(-------+-date------------------------------------------------------+--)------------><
                                                     +-timestamp-------------------------------------------------+
                                                     |               (6)                                         |
                                                     '-+-copyright-+-------+-----------------------------------+-'
                                                       '-user------'       |   (7)                        (8)  |
                                                                           '-,-------"--token_sequence--"------'
 

Notes:
  1. This is the start of the syntax diagram.
  2. The symbol # must appear first.
  3. The keyword pragma must appear following the # symbol.
  4. The name of the pragma comment must appear following the keyword pragma.
  5. An opening parenthesis must be present.
  6. The comment type must be entered only as one of the types indicated: compiler, date, timestamp, copyright, or user.
  7. A comma must appear between the comment type copyright or user, and an optional character string.
  8. A character string must follow the comma. The character string must be enclosed in double quotation marks.
  9. A closing parenthesis is required.
  10. This is the end of the syntax diagram.

The following examples of the #pragma comment directive are syntactically correct according to the diagram shown above:

   #pragma
   comment(date)
   #pragma comment(user)
   #pragma comment(copyright,"This text will appear in the module")  

How to read syntax statements

Syntax statements are read from left to right:

Example of a syntax statement

EXAMPLE char_constant {a|b}[c|d]e[,e]... name_list{name_list}...

The following list explains the syntax statement:

Note:
The same example is used in both the syntax-statement and syntax-diagram representations.

Examples

The examples in this document, except where otherwise noted, are coded in a simple style that does not try to conserve storage, check for errors, achieve fast performance, or demonstrate all possible methods to achieve a specific result.

Notes on path names

The path names shown in this document assume the default installation path for the XL C/C++ or XL Fortran compiler. By default, the compiler will be installed in the following directory on the selected disk:

XL C/C++
/opt/ibmcmp/vacpp/bg/8.0/
XL Fortran
/opt/ibmcmp/xlf/bg/10.1/

You can select a different destination (relocation-path) for the compiler. If you choose a different path, the compiler will be installed in the following directory:

XL C/C++
relocation-path/opt/ibmcmp/vacpp/bg/8.0/
XL Fortran
relocation-path/opt/ibmcmp/xlf/bg/10.1/