Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home

HP Fortran 90 Programmer's Reference: HP Series 700/800 Computers

» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

HP Part Number: B3908-90001

Edition: First Edition

Published: November 1996


Table of Contents

Printing History
Preface
Typographical conventions
In this book
1 Introduction to HP Fortran 90
New features in Fortran 90
2 Language elements
Character set
Lexical tokens
Names
Program structure
Statement labels
Construct names
Statements
Statement order
Source program forms
Fixed source form
Free source form
Intersection source form
INCLUDE line
3 Data types and data objects
Terminology
Intrinsic data types
Derived types
Type declarations
Examples of type declarations
Intrinsic inquiry functions
Attributes
Representation of literal constants
Integer constants
Real constants
Complex constants
Character constants
Logical constants
Typeless constants
Character substrings
Derived-type definition
Structure constructor
Implicit and explicit typing
IMPLICIT statement
Data initialization
Storage association and alignment
Storage association alignment rule
Dynamic data objects
Allocatable arrays
Pointers
Automatic objects
Records and structures
4 Arrays
New features
Array properties
Array declaration
Syntax
Examples of array specifiers
Array element storage order
Array categories
Explicit-shape arrays
Assumed-shape arrays
Deferred-shape arrays
Assumed-size arrays
Whole arrays and array subobjects
Array elements
Whole arrays
Array sections
Array constructors
Syntax
Zero-sized arrays
Array expressions
Array functions
Intrinsic functions
User-defined functions
Array inquiry functions
5 Expressions and assignment
Expressions
Formation of expressions
Interpretation of expressions
Assignment
Assignment statement
Pointer assignment
Masked array assignment
6 Execution control
Control constructs and statement blocks
CASE construct
DO construct
IF construct
Flow control statements
CONTINUE statement
CYCLE statement
EXIT statement
Assigned GO TO statement
Computed GO TO statement
Unconditional GO TO statement
Arithmetic IF statement
Logical IF statement
PAUSE statement
STOP statement
7 Program units and procedures
Overview
Program units
Procedures
Scope and association
Procedures
Procedure categories
Procedure use
Procedure definition
Returning to the calling unit
Subprogram arguments
Interfaces
Modules
USE statement
Main program
Block data
8 I/O and file handling
Records
Formatted records
Unformatted records
End-of-file record
Files
External files
Internal files
Connecting a file to a unit
Connecting to an external file
Internal files
Preconnected unit numbers
Automatically opened unit numbers
File access methods
Sequential access
Direct access
Nonadvancing I/O
I/O statements
Syntax of I/O statements
I/O specifiers
I/O data list
ASA carriage control
Example programs
Internal-file example
Nonadvancing-I/O example
Sequential- and direct-access example
9 I/O formatting
FORMAT statement
Format specification
Edit descriptors
Character string ('...' or "...") edit descriptor
Newline ($) edit descriptor
Slash (/) edit descriptor
Colon (:) edit descriptor
A and R (character) edit descriptors
B (b inary) edit descriptor
BN and BZ (blank) edit descriptors
D, E, EN, ES, F, G, and Q (real) edit descriptors
H (Hollerith) edit descriptor
I (integer) edit descriptor
L (logical) edit descriptor
O (octal) edit descriptor
P (scale factor) edit descriptor
Q (bytes remaining) edit descriptor
S, SP, and SS (plus sign) edit descriptors
T, TL, TR, and X (tab) edit descriptors
Z (hexadecimal) edit descriptor
Embedded format specification
Nested format specifications
Interaction between format specification and I/O data list
10 HP Fortran 90 statements
Attributes
Statements and attributes
ACCEPT
ALLOCATABLE (statement and attribute)
ALLOCATE
ASSIGN
AUTOMATIC
BACKSPACE
BLOCK DATA
BYTE
CALL
CASE
CHARACTER
CLOSE
COMMON
COMPLEX
CONTAINS
CONTINUE
CYCLE
DATA
DEALLOCATE
DECODE
DIMENSION (statement and attribute)
DO
DOUBLE COMPLEX
DOUBLE PRECISION
ELSE
ELSE IF
ELSEWHERE
ENCODE
END
END (construct)
END (structure definition)
END INTERFACE
END TYPE
ENDFILE
ENTRY
EQUIVALENCE
EXIT
EXTERNAL (statement and attribute)
FORMAT
FUNCTION
GO TO (assigned)
GO TO (computed)
GO TO (unconditional)
IF (arithmetic)
IF (block)
IF (logical)
IMPLICIT
INCLUDE
INQUIRE
INTEGER
INTENT (statement and attribute)
INTERFACE
INTRINSIC (statement and attribute)
LOGICAL
MAP
MODULE
MODULE PROCEDURE
NAMELIST
NULLIFY
ON
OPEN
OPTIONAL (statement and attribute)
PARAMETER (statement and attribute)
PAUSE
POINTER (Cray-style)
POINTER (statement and attribute)
PRINT
PRIVATE (statement and attribute)
PROGRAM
PUBLIC (statement and attribute)
READ
REAL
RECORD
RETURN
REWIND
SAVE (statement and attribute)
SELECT CASE
SEQUENCE
STATIC (statement and attribute)
STOP
STRUCTURE
SUBROUTINE
TARGET (statement and attribute)
TYPE (declaration)
TYPE (definition)
TYPE (I/O)
UNION
USE
VIRTUAL
VOLATILE
WHERE (statement and construct)
WRITE
11 Intrinsic procedures
Overview of intrinsic procedures
Availability of intrinsic procedures
Intrinsic subroutines and functions
INTRINSIC attribute and statement
Nonstandard intrinsic procedures
Data representation models
Data representation model intrinsics
The bit model
The integer number system model
The real number system model
Functional categories of intrinsic procedures
Generic and specific intrinsic summary
Data type sizes and compile-line options
Summary of generic and specific intrinsic names
Intrinsic procedure specifications
ABORT()
ABS(A)
ACHAR(I)
ACOS(X)
ACOSD(X)
ACOSH(X)
ADJUSTL(STRING)
ADJUSTR(STRING)
AIMAG(Z)
AINT(A, KIND)
ALL(MASK, DIM)
ALLOCATED(ARRAY)
AND(I, J)
ANINT(A, KIND)
ANY(MASK, DIM)
ASIN(X)
ASIND(X)
ASINH(X)
ASSOCIATED(POINTER, TARGET)
ATAN(X)
ATAN2(Y, X)
ATAN2D(Y, X)
ATAND(X)
ATANH(X)
BADDRESS(X)
BIT_SIZE(I)
BTEST(I, POS)
CEILING(A)
CHAR(I, KIND)
CMPLX(X, Y, KIND)
CONJG(Z)
COS(X)
COSD(X)
COSH(X)
COUNT(MASK, DIM)
CSHIFT(ARRAY, SHIFT, DIM)
DATE(DATESTR)
DATE_AND_TIME(DATE, TIME, ZONE, VALUES)
DBLE(A)
DCMPLX(X,Y)
DFLOAT(A)
DIGITS(X)
DIM(X, Y)
DNUM(I)
DOT_PRODUCT(VECTOR_A, VECTOR_B)
DPROD(X, Y)
DREAL(A)
EOSHIFT(ARRAY, SHIFT, BOUNDARY, DIM)
EPSILON(X)
EXIT(STATUS)
EXP(X)
EXPONENT(X)
FLOOR(A)
FLUSH(LUNIT)
FNUM(UNIT)
FRACTION(X)
FREE(P)
FSET(UNIT, NEWFD, OLDFD)
FSTREAM(UNIT)
GETARG(N, STRING)
GETENV(VAR, VALUE)
GRAN()
HFIX(A)
HUGE(X)
IACHAR(C)
IADDR(X)
IAND(I, J)
IARGC()
IBCLR(I, POS)
IBITS(I, POS, LEN)
IBSET(I, POS)
ICHAR(C)
IDATE(MONTH, DAY, YEAR)
IDIM(X, Y)
IEOR(I, J)
IGETARG(N, STR, STRLEN)
IJINT(A)
IMAG(A)
INDEX(STRING, SUBSTRING, BACK)
INT(A, KIND)
INT1(A)
INT2(A)
INT4(A)
INT8(A)
INUM(I)
IOMSG(N, MSG)
IOR(I, J)
IQINT(A)
IRAND()
IRANP(X)
ISHFT(I, SHIFT)
ISHFTC(I, SHIFT, SIZE)
ISIGN(A, B)
ISNAN(X)
IXOR(I, J)
IZEXT(A)
JNUM(I)
JZEXT(A)
KIND(X)
KZEXT(A)
LBOUND(ARRAY, DIM)
LEN(STRING)
LEN_TRIM(STRING)
LGE(STRING_A, STRING_B)
LGT(STRING_A, STRING_B)
LLE(STRING_A, STRING_B)
LLT(STRING_A, STRING_B)
LOC(X)
LOG(X)
LOG10(X)
LOGICAL(L, KIND)
LSHFT(I, SHIFT)
LSHIFT(I, SHIFT)
MALLOC(SIZE)
MATMUL(MATRIX_A, MATRIX_B)
MAX(A1, A2, A3, ...)
MAXEXPONENT(X)
MAXLOC(ARRAY, MASK)
MAXVAL(ARRAY, DIM, MASK)
MCLOCK()
MERGE(TSOURCE, FSOURCE, MASK)
MIN(A1, A2, A3, ...)
MINEXPONENT(X)
MINLOC(ARRAY, MASK)
MINVAL(ARRAY, DIM, MASK)
MOD(A, P)
MODULO(A, P)
MVBITS(FROM, FROMPOS, LEN, TO, TOPOS)
NEAREST(X, S)
NINT(A, KIND)
NOT(I)
OR(I, J)
PACK(ARRAY, MASK, VECTOR)
PRECISION(X)
PRESENT(A)
PRODUCT(ARRAY, DIM, MASK)
QEXT(A)
QFLOAT(A)
QNUM(I)
QPROD(X, Y)
RADIX(X)
RAN(ISEED)
RAND()
RANDOM_NUMBER(HARVEST)
RANDOM_SEED(SIZE, PUT, GET)
RANGE(X)
REAL(A, KIND)
REPEAT(STRING, NCOPIES)
RESHAPE(SOURCE, SHAPE, PAD, ORDER)
RNUM(I)
RRSPACING(X)
RSHFT(I, SHIFT)
RSHIFT(I, SHIFT)
SCALE(X, I)
SCAN(STRING, SET, BACK)
SECNDS(X)
SELECTED_INT_KIND(R)
SELECTED_REAL_KIND(P, R)
SET_EXPONENT(X, I)
SHAPE(SOURCE)
SIGN(A, B)
SIN(X)
SIND(X)
SINH(X)
SIZE(ARRAY, DIM)
SIZEOF(A)
SPACING(X)
SPREAD(SOURCE, DIM, NCOPIES)
SQRT(X)
SRAND(ISEED)
SUM(ARRAY, DIM, MASK)
SYSTEM(STR)
SYSTEM_CLOCK(COUNT, COUNT_RATE, COUNT_MAX)
TAN(X)
TAND(X)
TANH(X)
TIME(TIMESTR)
TINY(X)
TRANSFER(SOURCE, MOLD, SIZE)
TRANSPOSE(MATRIX)
TRIM(STRING)
UBOUND(ARRAY, DIM)
UNPACK(VECTOR, MASK, FIELD)
VERIFY(STRING, SET, BACK)
XOR(I, J)
ZEXT(A)
12 Library routines
HP Fortran 90 libraries
Shared and archive libraries
Library and linker compile-line options
Library searching options
Name mapping options
Output file options
libU77 system routines
Categories of libU77 routines
Special processing of libU77 routines
libU77 routine name mapping
Declaring libU77 routines EXTERNAL
Examples of using libU77 routines
Descriptions of libU77 routines
Basic Linear Algebra Subroutine (BLAS) library
13 Compile-line options
General compiler syntax
Commonly used options
Compile-line options by category
f77 options supported by f90
List of compile-line options
Optimization options
General optimization options
Fine-tuning optimization options
14 Compiler directives
Directive syntax
HP Fortran 90 directives
$HP$ ALIAS directive
$HP$ CHECK_OVERFLOW directive
$HP$ LIST directive
$HP$ OPTIMIZE directive
A HP Fortran 90 Extensions
Language elements
Data types and objects
Array concepts
Expressions
Execution control
Scope, program units, and procedures
I/O and file handling
I/O formatting
Statements
Intrinsic procedures
Miscellaneous
B HP character set
HP-UX ASCII character set
Hewlett-Packard character set for computer systems
C I/O Runtime Error Messages
Runtime I/O Errors
D Using the ON statement
Trapping runtime errors with the ON statement
How the ON statement works
Determining trap actions
Trap procedures for arithmetic errors
Overview of how to handle arithmetic errors
Terminating program execution
Ignoring errors
Calling a trap procedure
Specifying Control-C trap procedures
Allowing core dumps with the ON statement
Glossary
Index

List of Tables

2-1  Fortran 90 character set
2-2 Keywords allowing optional spacing
3-1  Types and kind parameters
3-2 Title not available (Real constants)
3-3 Title not available (Complex constants)
3-4  Escape characters
3-5 Example of structure storage
5-1  Intrinsic operators
5-2  Operator precedence
5-3 Operator precedence: examples
5-4  Logical operators
5-5 Conversion of variable=expression
7-1 Categories of intrinsic functions
8-1  Input values for list-directed I/O
8-2  Format of list-directed input data
8-3  Format of list-directed output data
8-4  Data transfer statements
8-5  File positioning statements
8-6  Auxiliary statements
8-7  ASA carriage-control characters
9-1  Edit descriptors
9-2  Character string edit descriptor: output examples
9-3  Contents of character data fields on input
9-4  Contents of character data fields on output
9-5  A and R edit descriptors: input examples
9-6  A and R edit descriptors: output examples
9-7  B edit descriptor: input examples
9-8  B edit descriptor: output examples
9-9  BN and BZ edit descriptors: input examples
9-10  D, E, F, and G edit descriptors: input examples
9-11  D and E edit descriptors: output examples
9-12  EN and ES edit descriptors: output examples
9-13  F edit descriptor: output examples
9-14  G edit descriptor: output examples
9-15  H edit descriptor: output examples
9-16  I edit descriptor: input examples
9-17  I edit descriptor: output examples
9-18  L edit descriptor: input examples
9-19  L edit descriptor: output examples
9-20  O edit descriptor: input examples
9-21  O edit descriptor: output examples
9-22  P edit descriptor: input and output examples
9-23  Z edit descriptor: input examples
9-24  Z edit descriptor: output examples
9-25  Format control and nested format specifications
11-1  Intrinsic functions related to data representation models
11-2  Intrinsic procedures by category
11-3  HP Fortran 90 default data type sizes (partial listing)
11-4  +autodbl data type sizes
11-5  +autodbl4 data type sizes
11-6  Generic and specific intrinsic procedures
11-7 Title not available (AND(I, J))
11-8 Title not available (EOSHIFT(ARRAY, SHIFT, BOUNDARY, DIM) )
11-9 Title not available (IAND(I, J) )
11-10 Title not available (IEOR(I, J) )
11-11 Title not available (IOR(I, J) )
11-12 Title not available (IXOR(I, J))
11-13 Title not available (NOT(I) )
11-14 Title not available (OR(I, J))
12-1  HP Fortran 90 libraries
12-2  Linker shared/archive library options
12-3  libU77 naming conflicts
12-4  libU77 routines
12-5  BLAS routines
13-1  Commonly used f90 options
13-2  Options listed by category
13-3  f77 options supported by f90
13-4  Values for the +FP option
13-5  Signals recognized by the +fp_exception option
13-6  Levels of optimization
13-7  Values for the -t option
13-8  Values for the -W option
13-9  Optimizations performed by +O[no]fltacc
13-10 Values for the +Oinline_budget option
14-1  HP Fortran 90 directives
B-1  HP-UX ASCII character set
B-2  HP-UX character set
D-1  Interrupt conditions
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1996 Hewlett-Packard Development Company, L.P.