[PDF] fortran 90
[PDF] fortran 90 basics pdf
[PDF] fortran 90 example
[PDF] fortran 90 function
[PDF] fortran 90 handbook pdf
[PDF] fortran 90 pi
[PDF] fortran 90 programming pdf
[PDF] fortran 90 read
[PDF] fortran 90 standard pdf
[PDF] fortran 90 textbook
[PDF] fortran 90 textbook pdf
[PDF] fortran 90 tutorial pdf
[PDF] fortran 90 write format
[PDF] fortran 90/95 pdf
[PDF] fortran 95 compiler
FORTRAN 77 4.0 Reference Manual
A Sun Microsystems, Inc. Business
Part No.: 802-2998-10
Revision A, November 19952550 Garcia Avenue
Mountain View, CA 94043
U.S.A.
Please
Recycle
Ó 1995 Sun Microsystems, Inc. 2550 Garcia Avenue, Mountain View, California 94043-1100 U.S.A.
All rights reserved. This product or document is protected by copyright and distributed under licenses restricting its use, copying, distribution
and decompilation. No part of this product or document may be reproduced in any form by any means without prior written authorization of
Sun and its licensors, if any.
Portions of this product may be derived from the UNIX system and from the Berkeley 4.3 BSD system, licensed from the University of
California. Third-party software, including font technology in this product, is protected by copyright and licensed from Sun"s Suppliers.
RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by the government is subject to restrictions as set forth in subparagraph
(c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR 52.227-19.
The product described in this manual may be protected by one or more U.S. patents, foreign patents, or pending applications.
TRADEMARKS
SunSoft, A Sun Microsystems, Inc. Business, Sun, Sun Microsystems, the Sun logo, Sun Microsystems Computer Corporation, the Sun
Microsystems Computer Corporation logo, the SunSoft logo, Solaris, SunOS, and OpenWindows are trademarks or registered trademarks of
Sun Microsystems, Inc. in the U.S. and certain other countries. UNIX is a registered trademark in the United States and other countries,
exclusively licensed through X/Open Company, Ltd. OPEN LOOK is a registered trademark of Novell, Inc. PostScript and Display PostScript
are trademarks of Adobe Systems, Inc. Intel® is a registered trademark of Intel Corporation. Pentium™ is a trademark of Intel Corporation.
Cray® is a registered trademark of Cray Research, Inc. VAX® and VMS® are registered trademarks of Digital Equipment Corporation. CDC
is a registered trademark of Control Data Corporation. UNIVAC is a registered trademark of UNISYS Corporation. All other product, service,
or company names mentioned herein are claimed as trademarks and trade names by their respective companies.
All SPARC trademarks, including the SCD Compliant Logo, are trademarks or registered trademarks of SPARC International, Inc. in the United
States and may be protected as trademarks in other countries. SPARCcenter, SPARCcluster, SPARCompiler, SPARCdesign, SPARC811,
SPARCengine, SPARCprinter, SPARCserver, SPARCstation, SPARCstorage, SPARCworks, microSPARC, microSPARC-II, and UltraSPARC
are
licensed exclusively to Sun Microsystems, Inc. Products bearing SPARC trademarks are based upon an architecture developed by Sun
Microsystems, Inc.
The OPEN LOOK™ and Sun™ Graphical User Interfaces were developed by Sun Microsystems, Inc. for its users and licensees. Sun
acknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer
industry. Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface, which license also covers Sun"s licensees who
implement OPEN LOOK GUI"s and otherwise comply with Sun"s written license agreements. X Window System is a trademark of the X Consortium.
Some of the material in this manual is based on the Bell Laboratories document entitled "A Portable Fortran 77 Compiler," by S. I. Feldman
and P. J. Weinberger, dated August 1, 1978. Material on the I/O Library is derived from the paper entitled "Introduction to the f77 I/O
Library," by David L. Wasley, University of California, Berkeley, California 94720. Further work was done at Sun Microsystems.
THIS PUBLICATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-
INFRINGEMENT.
THIS PUBLICATION COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE
PERIODICALLY ADDED TO THE INFORMATION HEREIN, THESE CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THE
PUBLICATION. SUN MICROSYSTEMS, INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE
PROGRAMS(S) DESCRIBED IN THIS PUBLICATION AT ANY TIME. iiiFORTRAN 77 Reference Manual
Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
1. Elements of FORTRAN 77. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Operating Environments. . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Standards. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.4 Basic Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.5 Character Set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.6 Symbolic Names. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.7 Program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.8 Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Executable or Nonexecutable Statements . . . . . . . . . . . . . . . . 7 FORTRAN 77 Statements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.9 Source Line Formats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Standard Fixed Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Tab-Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 ivFORTRAN 77 Reference Manual Mixing Formats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Continuation Lines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Extended Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Padding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Comments and Blank Lines. . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Directives. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2. Data Types and Data Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.1 Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Rules for Data Typing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Array Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Properties of Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.2 Constants. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Character Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Complex Constants. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 COMPLEX*16Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 COMPLEX*32(Quad Complex) Constants . . . . . . . . . . . . . . . 29 Integer Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Logical Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Real Constants. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 REAL*8 (Double-Precision Real) Constants . . . . . . . . . . . . . . 33 REAL*16 (Quad Real) Constants . . . . . . . . . . . . . . . . . . . . . . . 34 Typeless Constants (Binary, Octal, Hexadecimal). . . . . . . . . . 35
2.3 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Contentsv
2.4 Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Array Declarators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Array Names with No Subscripts. . . . . . . . . . . . . . . . . . . . . . . 43 Array Subscripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Array Ordering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
2.5 Substrings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
2.6 Structures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Field Declaration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Rules and Restrictions for Structures. . . . . . . . . . . . . . . . . . . . 50 Rules and Restrictions for Fields . . . . . . . . . . . . . . . . . . . . . . . 50 Record Declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Record and Field Reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Substructure Declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Unions and Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.7 Pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Syntax Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Usage of Pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Address and Memory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Optimization and Pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
3. Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3.1 Expressions, Operators, and Operands . . . . . . . . . . . . . . . 65
3.2 Arithmetic Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Basic Arithmetic Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . 67 viFORTRAN 77 Reference Manual Mixed Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Arithmetic Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
3.3 Character Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Character String Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . 76 Rules of Assignment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
3.4 Logical Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
3.5 Relational Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
3.6 Constant Expressions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
3.7 Record Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
3.8 Evaluation of Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . 83
4. Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
4.1ACCEPT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
4.2ASSIGN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
4.3 Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
4.4AUTOMATIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
4.5BACKSPACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
4.6BLOCK DATA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
4.7BYTE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
4.8CALL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
4.9CHARACTER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
4.10CLOSE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
4.11COMMON. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
4.12COMPLEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
4.13CONTINUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Contentsvii
4.14DATA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
4.15DECODE/ENCODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
4.16DIMENSION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
4.17DO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
4.18DO WHILE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
4.19DOUBLE COMPLEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
4.20DOUBLE PRECISION. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
4.21ELSE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
4.22ELSE IF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
4.23ENCODE/DECODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
4.24END. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
4.25END DO. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
4.26END FILE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
4.27END IF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
4.28END MAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
4.29END STRUCTURE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
4.30END UNION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
4.31ENTRY. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
4.32EQUIVALENCE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
4.33EXTERNAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
4.34FORMAT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
4.35FUNCTION (External) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
4.36GO TO (Assigned). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
4.37GO TO (Computed). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
viiiFORTRAN 77 Reference Manual
4.38GO TO (Unconditional) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
4.39IF (Arithmetic) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
4.40IF (Block). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
4.41IF (Logical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
4.42IMPLICIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
4.43INCLUDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
4.44INQUIRE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
4.45INTEGER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
4.46INTRINSIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
4.47LOGICAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
4.48MAP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
4.49NAMELIST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
4.50OPEN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
4.51OPTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
4.52PARAMETER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
4.53PAUSE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
4.54POINTER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
4.55PRINT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
4.56PROGRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
4.57READ. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
4.58REAL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
4.59RECORD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
4.60RETURN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
4.61REWIND. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
Contentsix
4.62SAVE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
4.63 Statement Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
4.64STATIC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
4.65STOP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
4.66STRUCTURE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
4.67SUBROUTINE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
4.68TYPE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
4.69 The Type Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
4.70UNION andMAP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
4.71VIRTUAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
4.72VOLATILE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
4.73WRITE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
5. Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
5.1 General Concepts of FORTRAN 77 I/O . . . . . . . . . . . . . . 251
Logical Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 I/O Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 General Restriction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 Kinds of I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 Combinations of I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 Printing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 Scratch Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256 Changing I/O Initialization withIOINIT. . . . . . . . . . . . . . . . 257
5.2 Direct Access. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Unformatted I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 xFORTRAN 77 Reference Manual Formatted I/O. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
5.3 Internal Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Sequential Formatted I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 Direct Access I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
5.4 Formatted I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Input Actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 Output Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 Format Specifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 Runtime Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 Variable Format Expressions (
) . . . . . . . . . . . . . . . . . . . . . . 297 5.5 Unformatted I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
Sequential Access I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 Direct Access I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 5.6 List-Directed I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
Output Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 Unquoted Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 Internal I/O. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305 5.7NAMELIST I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Syntax Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305 Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306 Output Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306 Input Actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308 Data Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 Name Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 Contentsxi
6. Intrinsic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
6.1 Arithmetic and Mathematical Functions. . . . . . . . . . . . . . 315
Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 Type Conversion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 Trigonometric Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 Other Mathematical Functions . . . . . . . . . . . . . . . . . . . . . . . . . 322 6.2 Character Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
6.3 Miscellaneous Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Bit Manipulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 Environmental Inquiry Functions. . . . . . . . . . . . . . . . . . . . . . . 326 Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 6.4 Remarks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
6.5 Notes on Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
6.6 VMS Intrinsic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
Double-Precision Complex . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 Degree-Based Trigonometric. . . . . . . . . . . . . . . . . . . . . . . . . . . 333 Bit-Manipulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 Multiple Integer Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 Functions Coerced to a Particular Type . . . . . . . . . . . . . . . . . . 336 Functions Translated to a Generic Name. . . . . . . . . . . . . . . . . 337 Zero Extend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338 7. FORTRAN 77 Library Routines . . . . . . . . . . . . . . . . . . . . . . . . . 339
7.1abort: Terminate and Write Memory to Core File . . . . . 339
7.2access: Check File for Permissions or Existence . . . . . . 339
xiiFORTRAN 77 Reference Manual 7.3alarm: Execute a Subroutine after a Specified Time . . . . 340
7.4bit: Bit Functions:and,or, ...,bit,setbit, ... . . . . . . 342
Usage:and,or,xor,not,rshift,lshift. . . . . . . . . . . . . . 343 Usage:bic,bis,bit,setbit. . . . . . . . . . . . . . . . . . . . . . . . . 344 7.5chdir: Change Default Directory . . . . . . . . . . . . . . . . . . . 345
7.6chmod: Change the Mode of a File. . . . . . . . . . . . . . . . . . . 346
7.7date: Get Current System Date as a Character String . . 347
7.8dtime,etime: Elapsed Execution Time. . . . . . . . . . . . . . 347
dtime: Elapsed Time Since the Lastdtime Call . . . . . . . . . . 347 etime: Elapsed Time Since Start of Execution . . . . . . . . . . . . 348 7.9exit: Terminate a Process and Set the Status. . . . . . . . . . 350
7.10f77_floatingpoint: FORTRAN 77 IEEE Definitions. 350
IEEE Rounding Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 SIGFPE Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 IEEE Exception Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352quotesdbs_dbs19.pdfusesText_25