<<

Character Sets and Collating Sequences ______A- A SETS AND COLLATING SEQUENCES

A.I Processor-Dependent Character Sets Default character type: The character set of the default character type contains at least all characters of the Fortran character set. In addition to the Fortran character set, a Fortran processor may support other representable cha• racters, which may appear only in character literal constants, in character string edit descriptors, in comments, and in formatted records. The processor character set may contain control characters. Nondefault character type: If a Fortran processor supports in addition to the default character type one or more nondefault character types, the cha• racters of such a nondefault character type may appear only in character literal constants of that type or in formatted records. In the last case, the types of the datum in the record and of the corresponding input/output list item must agree. One character in the character set of a nondefault character type is designated as the blank character; this blank character of the non default character type may be used as the padding character for formatted input.

Collating sequence Each processor-dependent character set has its own collating sequence. The first character has position 0, the second has position 1, and so on. The ICHAR intrinsic function returns for a given character the position of this character in the processor-dependent collating sequence. For example, the function refe• rence ICHAR(,') returns the integer value 231 if the Fortran processor uses the EBCDIC character set. And conversely, the CHAR intrinsic function retu~ for a given nonnegative integer value the character that corresponds to this given po- ~ sition in the processor-dependent collating sequence. For example, CHAR(231) returns the character 'X' if the EBCDIC character set is used.

A.2 ASCII Character Set The ASCII character set is a standard character set. The International Fortran Standard refers to ISO/IEC 646:1991. With regard to letters, digits, and special characters of the Fortran character set, ISO/IEC 646:1991 and ANSI X3.4-1986, which is the US national vers;on of the ISO /IEC standard, are identical. An ASCII character is encoded by 7 . Therefore, a standard ASCII character set contains a total number of 128 characters. The first 32 characters (hex 00 to hex IF) of the ASCII character set are control characters and graphic characters. Nearly all other characters (hex 20 to hex 7E) are printable characters. A-2 ______Character Sets and Collating Sequences

b7 0 0 1 1 b6 0 0 1 1 0 0 1 1 0 0 011 011 b5 01 1 01 1 1 1 Bits Control Symbols, Upper-case Lower-case b4 b3 b2 b1 Characters Digits Letters Letters 0 16 32 48 G4 80 9G 112 0 0 0 0 NUL DLE SP 0 @ P 0 10 20 20 40 30 GO 40 100 50 120 GO 140 70 P 1GO 1 17 33 49 G5 81 97 113 0 0 0 1 SOH DC1 ! 1 A a q 1 1 11 21 21 41 31 G1 41 101 51 121 G1 141 71 1G1 2 18 34 50 GG 82 98 114 0 0 1 0 STX DC2 " 2 b r 2 2 12 22 22 42 32 G2 42 102 52 122 G2 142 72 162 3 19 35 51 G7 83 99 115 0 0 1 1 ETX DC3 # 3 c S 3 3 13 23 23 43 33 G3 43 103 53 123 G3 143 73 IG3 4 20 3G 52 G8 84 100 11G 0 1 0 0 EOT DC4 $ 4 d t 4 4 14 24 24 44 34 G4 44 104 54 124 G4 144 74 1G4 5 21 37 53 G9 85 101 117 0 1 0 1 ENQ NAK % 5 U e u 5 [) 15 25 25 45 35 G5 45 105 55 125 G5 145 75 1135 0 22 38 54 70 80 102 118 0 1 1 0 ACK SYN & 6 f v 0 o 10 20 20 40 3G 00 40 100 56 120 00 140 70 160 7 23 39 , [)5 71 87 103 119 0 1 1 1 BEL ETB 7 W 7 7 17 27 27 47 37 07 47 107 57 127 07 9 147 77 107 8 24 40 50 72 88 104 120 1 0 0 0 BS CAN ( 8 X h x 8 10 18 30 28 50 38 70 48 110 58 130 08 150 78 170 D 25 41 57 73 89 105 121 1 0 0 1 HT EM ) 9 1 i 9 11 19 31 29 51 39 71 49 111 59 131 09 151 79 Y 171 10 20 42 58 74 90 100 122 1 0 1 0 LF SUB * j Z A 12 1A 32 2A 52 3A 72 4A 112 5A 132 GA 152 7A 172 11 27 43 59 75 91 107 123 1 0 1 1 VT ESC , [ k { B 13 18 33 2B + 53 38 73 4B 113 58 133 OB 153 7B 173 12 28 44 00 7G D2 108 124 1 1 0 0 FF FS , L I C 14 1C 34 2C 54 3C < 74 4C 114 5C \ 134 OC 154 7C I 174 13 20 45 01 77 93 100 125 1 1 0 1 CR GS - ] m } D 15 1D 35 2D 55 3D = 75 4D 115 5D 135 OD 155 7D 175 14 30 4G G2 78 94 110 120 1 1 1 0 SO RS > A n rv E 10 IE 30 2E 50 3E 7G 4E 110 5E 130 OE 150 7E 170 15 31 47 03 79 95 111 127 1 1 1 1 SI US / ? 0 0 DEL F 17 IF 37 2F 57 3F 77 4F 117 5F - 137 GF Hi7 7F 177

The IACHAR intrinsic function returns for a given character the position of this character in the ASCII collating sequence; IACHAR('X') returns the integer value 88. And the ACHAR intrinsic function returns for a given nonnegative integer value the character that corresponds to this given value in the ASCII collating sequence; ACHAR(88) returns the character 'X'. The intrinsic functions LGE, LGT, LLE, and LLT perform lexical comparisons of character strings on the basis of the ASCII collating sequence. Models for Numbers ______B-1 B MODELS FOR NUMBERS

The manipulation intrinsic subprograms, the numeric manipulation intrinsic functions, and the inquiry intrinsic functions are defined in terms of models for the representation of each kind of integer, real, or double precision real data implemented by the processor. These models are used to describe the charac• teristics and the behaviour of the corresponding number sets of a particular type. A model has parameters which are chosen by the Fortran processor such that the model best fits the hardware. Note that these models do not dictate to the Fortran processor how it has to implement numbers and how they should behave, but the internal representation and the behaviour of the actually implemented numbers are described in terms of these (abstract) models.

B.1 Models for Integers

The models for integer data i are defined by:

q i = s x l: Wk x r k - 1 k=l with Value Description s +1 or -1 sign r integer > 1 base q integer > 0 max. number of digits Wk each an integer with 0 ::; Wk < r digit

The parameters r and q ~etermine the set of value~ of the integer model numbers. ~ Example: For model z = s X l:~~l Wk X 2k- 1 IS q = 31 and r = 2. ~

B.2 Models for Reals

The models for real data x are defined by: B-2 ______Models for Numbers with Value Description 8 +1 or -1 sign b integer > 1 base P integer> 1 max. number of digits fk each an integer with 0 S ik < b, digit but h > 0 e integer with emin S e S emax exponent

The parameters b, p, emin, and emax determine the set of values of the (real) floating point model numbers.

Example: For model x = {O e (/ ,,24 f -k) 8 X 2 x 1 2 + L..Jk=2 k X 2 ,-126 S e S 127 is b = 2, p = 24, emin = -126, and emax = 127.

B.3 Models for Bit Manipulation

Bit manipulations are performed on integer data. Therefore, a bit is defined as a binary digit w at position k of a nonnegative integer datum. The models for these integers are defined by:

5-1 j = :L Wk X 2k k=O with Value Description 8 integer > 0 maximal number of digits Wk each either 0 or 1 digit, bit

The parameter 8 determines the set of values.

Example: For model j = L~;O Wk X 2k is 8 = 32. It defines a model for integer data with 32 bits.

The models for bit manipulation define that the integer datum is a sequence of 8 bits, which are numbered from the right to the left beginning with 0 for the rightmost bit and ending with (8 - 1) for the leftmost bit. These models apply only to the intrinsic subprograms for bit manipulation and bit inquiry. For all other purposes, the "normal" models for integer data must be used. Decremental Language Features ______(-1 C DECREMENTALFEATURES

C.l Deleted Language Features

The following deleted language features are not included in the normative part of the standard document but in its informative appendix. They are considered as redundant and largely unused. Fortran 95 is only a partly up• ward compatible extension to Fortran 90. Any standard-conforming Fortran 90 that does not include one of the deleted language features is also standard• conforming under Fortran 95. Since the list of deleted features is very small, migration from Fortran 90 to Fortran 95 will cause hardly problems.

Real and double precision real DO variables Real and double precision real DO variables and loop parameters, are not supported by Fortran 95. Noninteger loop control is processor-dependent and makes programs nonportable. Thus a design fault introduced with FORTRAN 77 and for consistency ported to Fortran 90 is removed.

Branching to ENDIF In Fortran 95, branching to an ENDIF statement is allowed only from a block inside the corresponding IF construct. Branching from the outside to an END IF was erroneously allowed in FORTRAN 77 and for consistency also in Fortran 90.

PAUSE statement The anachronistic PAUSE statement, present III FORTRAN 77 and for consistency also in Fortran 90, has been deleted. ASSIGN, assigned GOTO, and assigned format specifier The ASSIGN statement, the assigned GOTO statement, and the ability to use an assigned integer variable as a format specifier, present in FORTRAN 77 and for consistency also in Fortran 90, have been deleted. H edit descriptor (!II The H edit descriptor, present in FORTRAN 77 and for consistency also in Fortran 90, have been deleted. C-2 Decremental Language Features

C.2 Obsolescent Language Features

The following language features are described as obsolescent language features within the standard document. They are considered to have been redundant in Fortran 90, are still frequently used, but are candidates for removal from Fortran 2000, the next revision of the language. Therefore, programmers should use the better methods in Fortran 95 in new programs and convert existing programs to these methods.

Arithmetic IF Use the logical IF statement or the IF construct. Shared DO termination for nested DO loops Use an ENDDO or a CONTINUE statement corresponding to each DO statement. DO termination other than ENDDO or CONTINUE Use an ENDDO or a CONTINUE statement as DO termination. Alternate return from subroutine Let the subroutine compute a return code that is used in a CASE construct immediately after the CALL statement on return from the subroutine. Computed GOTO Use a CASE construct. Statement function Use an internal function. DATA statement amongst executable statements Position DATA statements within the specification part of a program unit or subprogram only. Assumed length character functions Use a subroutine whose arguments correspond to the function result and the function arguments. Fixed source form Use only free source form. There are tools available to convert existing programs from fixed source form to free source form. Assumed size array Depending on the context, use an automatic array, an assumed-shape array, an allocatable array, or an array pointer. CHARACTER *length Use the form CHARACTER ([LEN =jlength). Index ______D-1

INDEX

A edit descriptor 12-8 ANINT function 14-3, 14-11, 14-14 ABS function 14-3, 14-11, 14-13 ANY function 14-3, 14-15 access method 11-3 argument association 4-12, 13-45 ACCESS= specifier 11-42, 11-43, 11-45 argument keyword 13-44, 14-10 accessible argument list 13-42 -t host association arithmetic IF statement 10-3 -t USE association arithmetic -t numeric ACHAR function 14-3, 14-13 array 4-1, 4-5, 6-1 ACOS function 14-3, 14-11, 14-13 array assignment statement 6-21, ACTION= specifier 11-42, 11-44 8-1, 8-11 actual argument list 13-44, 13-42 array bound 6-1 additional entry point 13-37 array component 2-9 ADJUSTL function 14-3, 14-13 array constructor 6-18 ADJUSTR function 14-3, 14-13 array declaration 6-1 ADVANCE= specifier 11-10 array element 4-1, 4-6, 6-5 advancing input/output 11-20 order, position 4-8, 4-9 AIMAG function 14-3, 14-11, 14-14 array expression 6-19, 7-2 AINT function 14-3, 14-11, 14-14 array function 6-21 ALL function 14-3, 14-14 array operand 6-19 allocatable array 6-14 array operation 6-19 ALLOCATABLE attribute 9-3 array pointer 6-16 ALLOCATABLE statement 9-19 array processing 6-1 ALLOCATE statement 5-2, 6-14 array reference 6-4 ALLOCATED function 14-3, 14-14 array section 4-1, 4-6, 6-6 allocation status 6-15 array section of substrings 6-12 ALOG function 14-6, 14-11 array specification 6-1 ALOG1O function 14-6, 14-11 array subprogram 6-21 alternate return 13-22, 13-40, 13-41, 13-44 array variable 4-3 alternate return target 13-22 ASCII 7-10, A-I AMAXO function 14-2, 14-3, 14-11 ASIN function 14-3, 14-11, 14-15 AMAXI function 14-2, 14-6, 14-11 assignment block 8-14 AMINO function 14-2, 14-3, 14-11 assignment interface block 8-7 AMINI function 14-2, 14-6, 14-11 assignment statement 8-1 AMOD function 14-7, 14-11 assignment subroutine 8-7, 13-23 D-2 ______lndex assignment 3-3 CABS function 14-3, 14-11 ASSIGNMENT( =) 8-7 CALL statement 13-21 ASSOCIATED function 14-3, 14-15 carriage control (character) 11-41 association 4-12 CASE construct 10-10 association status (of a pointer) 5-3 case expression 10-10 assumed length 9-18, 13-14, 13-50 case index 10-10 assumed-shape array 6-2, 13-55 CASE statement 10-10, 10-11 assumed-size array 6-3, 13-55 case value 10-11, 10-12 assumed type parameter case-block 10-10, 10-13 --+ assumed length CCOS function 14-4, 14-11 dummy argument 13-43,13-57 CEILING function 14-4, 14-16 ATAN function 14-3, 14-11, 14-16 CEXP function 14-5, 14-11 ATAN2 function 14-4, 14-11, 14-16 CHAR function 14-2, 14-4, 14-11, attribute 4-1, 9-1, 9-2, 9-19 14-17 attribute specification statement 9-19 character assignment statement 8-4 automatic array 6-13 character constant edit descriptor automatic variable 4-11 12-11 character expression 7-12 B edit descriptor 12-9 character format specification 12-2 statement 11-52 character length 3-7, 4-4, 9-17, 9-26, binary constant 3-8 13-49 BIT _SIZE function 14-4, 14-16 character operator 7-13 blank character position 2-4 in input 11-38, 11-43, 11-45, 12-7 character relational expression 7-9 in source program 1-2, 1-4, 1-5 character sequence type 2-7 blank common 9-31 character set blank control edit descriptor 12-10 ASCII A-I blank padding character 8-5, 11-14, Fortran 1-1 11-23, 11-44, 11-45, 11-51, 12-8 processor-dependent 7-9, A-I BLANK= specifier 11-42, 11-43, 11-49 CHARACTER statement 9-16 block 10-1, 10-5, 10-10 character storage unit 4-15 block data program unit 13-6 character string 2-4 BLOCK DATA statement 13-6 character string edit descriptor 12-5, BN edit descriptor 12-10 12-6 body of DO construct 10-15 character substring 4-4 BOZ constant 3-8 character type 2-4 branching 10-1 CLOG function 14-6, 14-11 branch target statement 10-1 close (a file) 11-46 BTEST function 14-4, 14-16 CLOSE statement 11-46 BZ edit descriptor 12-10 CMPLX function 14-4, 14-17 collating sequence 7-9, A-I C comment line 1-3 edit descriptor 12-11 Index ______D-3 comment 1-2, 1-3, 1-5 CSQRT function 14-8, 14-11 common block 4-15, 9-31, 13-59 current record 11-5 COMMON statement 9-31 CYCLE statement 10-20 complex type 2-3 COMPLEX statement 9-15 D edit descriptor 12-12 component DABS function 14-3, 14-11 array component 2-9 DACOS function 14-3, 14-11 structure component 4-9 DASIN function 14-3, 14-11 type component 2-5, 2-7 DATA attribute 9-4 component attribute 2-8 data edit descriptor 12-5, 12-6 component definition 2-7 data entity, data object 4-1 computed GO TO statement 10-2 DATA statement 9-19 concatenation 7-13 data transfer statement 11-19 condition data type 2-1 end-of-file condo 11-10, 11-11, 11-13 DATAN function 14-3, 14-11 end-of-record condo 11-10, 11-11, 11-12 DATAN2 function 14-4, 14-11 error condition 11-11, 11-12 DATE_AND_TIME subroutine conformable 6-19, 7-1 14-9, 14-19 CONJG function 14-4, 14-11, 14-17 DBLE function 14-4, 14-19 connection of a file (to a unit) 11-6 DCOS function 14-4, 14-11 constant 3-3, 4-1, 4-2 DCOSH function 14-4, 14-11 constant array constructor 6-19 DDIM function 14-4, 14-11 constant structure constructor 2-14 DEALLOCATE statement 5-5, 6-15 constant expression 7-24 deallocation 5-5, 6-15 construct 1-7, 10-1 declaration 9-1 construct entity 3-3 declaration statement constructed structure object 2-13 --t specification statement constructor 2-13, 6-18 DEFAULT 10-11 CONTAINS statement 13-2, 13-3, default type 2-1 13-11, 13-14, 13-19,13-20 default implicit typing 4-3,9-12,9-40 continuation (line) 1-2, 1-4 default initialization 2-5, 2-8, 2-10 CONTINUE statement 10-23 defined control edit descriptor 12-5, 12-6 assignment 8-6 control flow 10-1 elemental assignment 8-6 control information list 11-8 elemental operation 7-15 control mask 8-12 expression 7-14 COS function 14-4, 14-11, 14-17 operator 7-14 COSH function 14-4, 14-11, 14-18 defined 4-3, 4-16 COUNT function 14-4, 14-18 definition, definition status 4-16 count loop 10-14, 10-16, 10-18 DELIM= specifier 11-42, 11-44 CSHIFT function 14-4, 14-18 3-1 CSIN function 14-8, 14-11 derived type 2-5 D-4 ______lndex derived type assignment stmt. 8-5 elemental array assignment 8-2 derived type definition 2-5 elemental assignment 8-6 DEXP function 14-5, 14-11 elemental function 13-10, 13-15, DIGITS function 14-4, 14-19 13-39, 14-1 DIM function 14-4, 14-11, 14-20 elemental operation 6-20, 7-1 dimension (of an array) 4-5 ELEMENTAL prefix 13-11, 13-15, DIMENSION attribute 9-4 13-19, 13-20, 13-21 DIMENSION statement 9-23 elemental reference 13-18, 13-23, DINT function 14-3, 14-11 14-10 direct access 11-3 elemental subroutine 13-10, 13-21, direct input/output 11-3 13-39 DIRECT= specifier 11-47, 11-48 else-block 10-5, 10-7 disassociated 5-3 ELSE statement 10-5 DLOG function 14-6, 14-11 elsewhere-block 8-14 DLOG1O function 14-6, 14-11 ELSEWHERE statement 8-12 DMAX1 function 14-2, 14-6, 14-11 elseif-block 10-5, 10-7 DMIN1 function 14-2, 14-6, 14-11 ELSE IF statement 10-5 DMOD function 14-7, 14-11 empty input list 11-16 DNINT function 14-3, 14-12 empty record 11-16 DO construct 10-14 empty value list 6-19 DO statement 10-15 EN edit descriptor 12-14 do-termination statement 10-15 end of the record 11-27, 11-36 DO variable 6-18, 9-22, 10-15, 11-17 END statement 1-7, 1-8 DOT _PRODUCT function 14-4, 14-20 end-of-file condition 11-11, 11-13 double precision complex 9-15 end-of-record condition 11-10, 11-11 double precision real type 2-2 END= specifier 11-13 DOUBLE PRECISION statement 9-14 endfile record 11-2 DPROD function 14-4, 14-12, 14-20 END FILE statement 11-52, 11-53 DSIGN function 14-8, 14-12 ending position 4-4 DSIN function 14-8, 14-12 END BLOCKDATA statement 13-6 DSINH function 14-8, 14-12 END FORALL statement 8-19 DSQRT function 14-8, 14-12 END DO statement 10-15 DTAN function 14-8, 14-12 END FUNCTION statement 13-11, DTANH function 14-8, 14-12 13-14 dummy argument list 13-42 END IF statement 10-5 dummy array 13-51 END INTERFACE statement 13-33 dummy pointer 13-52 endless loop 10-14, 10-16, 10-20 dummy subprogram 13-28, 13-56 END MODULE statement 13-3,13-4 END PROGRAM fltatement 13-2, E edit descriptor 12-14 13-3 edit descriptor 12-1, 12-5 END SELECT statement 10-10, element sequence 13-53 10-12 Index ______D-5

END SUBROUTINE statement F edit descriptor 12-16 13-19, 13-20 field width 12-6, 12-7 END TYPE statement 2-6 file 11-2 END WHERE statement 8-12 file attribute 11-2 entry point 13-37 file name 11-3 ENTRY statement 13-37 file position 11-5 EOR= specifier 11-10 file positioning statement 11-52 EOSHIFT function 14-5, 14-20 file status statement 11-42 EPSILON function 14-5, 14-21 FILE= specifier 11-42, 11-43, 11-45, equality of derived types 2-7 11-47, 11-48 equals 3-3 FLOAT function 14-2, 14-7, 14-12 equivalence set 9-36 FLOOR function 14-5, 14-21 EQUIVALENCE statement 9-36 FMT= specifier 11-9 equivalent expressions 7-3 FORALL construct 8-19 ERR= specifier 11-12, 11-42, 11-43, FORALL construct statement 8-19 11-46, 11-47, 11-52 FORALL statement 8-17 error condition 11-11, 11-12 form (of a file) 11-5 edit descriptor 12-15 FORM= specifier 11-42, 11-43 evaluation of expressions 7-21 format control 12-3 executable statement 1-7 format item 12-1 execution condition 10-15, 10-16, format specification 12-1 10-17, 10-19 FORMAT statement 12-1 execution control statement 10-1 formatted execution part 13-2, 13-11, 13-19 file 11-5 EXIST= specifier 11-47, 11-48, 11-51 input/output 11-21 EXIT statement 10-18, 10-20 record 11-1 EXP function 14-5, 14-12, 14-21 FORMATTED= spec. 11-47, 11-49 explicit initialization 9-13 Fortran character set 1-1 explicit-shape array 6-2 Fortran processor vii EXPONENT function 14-5, 14-21 FRACTION function 14-5, 14-21 exponent part 12-12, 14-21 fractional part 14-21 exponent range 2-2, 14-35 function 13-8, 13-10 expression 7-1 definition 13-11 extent of a dimension 4-7, 6-6 reference, invocation 13-16 extended assignment 8-9 function result 13-12 extended operator 7-18 FUNCTION statement 13-11 extended Fortran 95 features 13-25 EXTERNAL attribute 9-5 G edit descriptor 13-16 external file 11-2 generic function 14-1 EXTERNAL statement 9-24 generic identifier 13-4, 13-35 external subprogram 13-23 generic interface block 7-15, 8-7, 13-32 D-6 ______lndex

generic name 13-32, 13-34, 14-1 initial line 1-2, 1-4 global entity, global name 3-2 initial point (of a file) 11-5 global scope 3-1 initial value 4-16,9-4,9-12,9-13,9-19 GO TO statement 10-2 initialization group-name 9-43, 11-9, 11-33, 11-35 default 4-16 group object 11-35 explicit 9-4, 9-12, 9-13, 9-19 multiple 2-11 hexadecimal constant 3-8 initialization expression 7-23, 7-25, high precedence (defined) expression 9-12, 9-13, 9-20 7-3, 7-10, 7-12, 7-19 initially nullified 9-19 host association 4-13 INOUT -+ INTENT attribute HUGE function 14-5, 14-22 input argo 9-5, 13-42, 13-58, 14-13 input field 12-12 I edit descriptor 12-17 input list 11-14 lABS function 14-3, 14-12 input/output 11-1 IACHAR function 14-5, 14-22 input/output argo 9-6, 13-42, 13-59 lAND function 14-5, 14-22 input/output list 11-14 IBCLR function 14-5, 14-22 input/output list item 11-14 IBITS function 14-5, 14-22 input/output specifier 11-8 IBSET function 14-5, 14-23 input/output statement 11-8 ICHAR function 14-2, 14-5, 14-12, input/output unit -+ unit 14-23 INQUIRE statement 11-47 IDIM function 14-4, 14-12 inquiry (by unit, by file, by output IDINT function 14-2, 14-5, 14-12 list) 11-47 IDNINT function 14-7, 14-12 inquiry function 14-1, 14-10 IEOR function 14-5, 14-23 instance (of a subprogram) 13-17, if-block 10-5, 10-7 13-23 IF construct 10-5 INT function 14-2, 14-5, 14-12, 14-24 IF THEN statement 10-5 integer type 2-1 IF statement 10-3 integer division 7-7 IFIX function 14-2, 14-5, 14-12 INTEGER statement 9-14 implicit initialization 4-16 intended use of argument 9-5, 9-24, implicit reference7-16, 8-8 13-58 IMPLICIT statement 9-40 INTENT attribute 9-5, 9-24, 13-58 implicit type declaration 9-12, 9-41 INTENT statement 9-24 implied-DO 6-18, 9-22, 11-17 interface -+ subprogram interface IN -+ INTENT attribute interface block 13-32 INCLUDE line 1-6 interface definition 7-15, 8-7, 13-32 INDEX function 14-5, 14-12, 14-23 INTERFACE statement 7-15, 8-7, index variable 8-17 13-33 indexed assignment 8-17 internal file 11-2, 11-30, 11-31 initial association status 9-13 internal input/output 11-30 Index ______D-7 internal subprogram 13-25 LEN_TRIM function 14-6, 14-25 interpretation of expression 7-20 lexical comparison 7-10, 14-2, 14-25, intrinsic 14-26 assignment statement 8-1 lexical token 1-4, 3-1 data type 2-1 LGE function 14-2, 14-6, 14-12, 14-25 expression 7-2 LGT function 14-2, 14-6, 14-12, 14-26 function 14-1 line operator 6-20,7-1,7-3,7-8 INCLUDE line 1-6 subprogram 14-1 printed line 11-41 subroutine 14-9 program line 1-1 INTRINSIC attribute 9-6 list-directed formatting 11-9, 11-25 INTRINSIC statement 9-24 list-directed input/output 11-25 invalid operation 7-7 literal constant 3-3 invocation 13-16, 13-21 LLE function 14-2, 14-6, 14-12, 14-26 IOLENGTH= specifier 11-47 LLT function 14-2, 14-6, 14-12, 14-26 IOR function 14-5, 14-24 local entity, local name 3-2 IOSTAT= specifier 11-11, 11-42, local scope 3-1 11-46, 11-47, 11-52 LOG function 14-6, 14-27 ISHFT function 14-5, 14-24 LOG1O function 14-6, 14-27 ISHFTC function 14-5, 14-24 logical type 2-4 ISIGN function 14-8, 14-12 logical assignment statement 8-3 iteration count 9-23, 10-17, 10-18 logical expression 7-10 LOGICAL function 14-6, 14-27 keyword 3-1, 13-44, 14-10 logical IF statement 10-4 keyword argument 13-44, 14-10 logical operator 7-10 KIND function 14-5, 14-25 LOGICAL statement 9-16 kind type parameter 2-1, 9-11, loop 14-25, 14-37 DO construct 10-14 kind type paramo conversion 7-5, 7-12 implied-DO 6-18, 9-22, 11-17 KIND= 9-11 nested loops 10-21 loop control 10-17 L edit descriptor 12-18 loop parameter 9-22, 10-15, 11-17 label --+ statement label loop termination 10-18 LBOUND function 14-5, 14-25 low precedence (defined) expression leading array specification 9-11 7-19 leading length specification 9-16 lower array bound 6-1 left tab limit 12-23 LEN function 14-6, 14-12, 14-25 main entry point 13-37 LEN= --+ length specification main program 13-1 length --+ character length mask expression 8-11, 8-12, 8-17, length specification 9-12, 9-16, 9-17, 8-18 9-18 MASK= argument 14-2 D-8 ______lndex masked array assignment 8-11 N AMELIST statement 9-43 MATMUL function 14-6, 14-27 NEAREST function 14-7, 14-32 MAX function 14-6, 14-28 NEQV ~ .NEQV. MAXEXPONENT function 14-6,14-28 nested constructs 8-15, 8-20, 8-21, maximum record length 11-43, 10-9, 10-21, 10-22 11-45, 11-49 next record 11-5 MAXLOC function 14-6, 14-28 NEXTREC= specifier 11-47 MAXVAL function 14-6, 14-29 NINT function 14-7, 14-12, 14-32 MAXO function 14-2, 14-6, 14-12 NML= specifier 11-9 MAXI function 14-2, 14-3, 14-12, 14-29 nonadvancing input/output 11-38 memory management 6-13 NONE ~ IMPLICIT statement MERGE function 14-6, 14-29 noneffective list items 11-14 MIN function 14-6, 14-30 nonexecutable statement 1-7 MINEXPONENT function 14-7, 14-30 nonrepeatable edit descriptor 12-6 MINLOC function 14-7, 14-30 NOT function 14-7, 14-32 MINVAL function 14-7, 14-31 NULL function 2-8, 2-10, 9-12, 9-13, MINO function 14-2, 14-6, 14-12 14-7, 14-32 MINI function 14-2, 14-3, 14-12, 14-31 null value 11-28, 11-37 MOD function 14-7, 14-12, 14-31 nullification 5-6 model number B-1 NULLIFY statement 5-6 module 13-3 NUMBER= specifier 11-47 module reference 13-3, 13-4 numeric assignment statement 8-3 MODULE statement 13-3 numeric editing 12-7 module subprogram 13-4, 13-27 numeric expression 7-3 MODULE PROCEDURE statement numeric operator 7-3 7-16,8-7, 13-33 numeric relational expression 7-8 MODULO function 14-7, 14-31 numeric sequence type 2-7 multiple initializations 2-11 numeric storage unit 4-14 multiple statements 1-2 MVBITS subroutine 14-9, 14-32 o edit descriptor 12-19 object ~ data object name 3-2 constant 3-8 name association 4-12 ONLY ~ USE statement NAME= specifier 11-47, 11-52 only-list 13-4, 13-6 named common block 4-15, 4-18, open (a file) 11-6, 11-42 9-29,9-31 OPEN statement 11-42 named constant 4-2,9-7,9-25 OPENED= specifier 11-47 NAMED= specifier 11-47 operand 7-1, 7-3, 7-10, 7-12, 7-14, namelist comment 11-37 7-21 namelist group 9-43, 9-44 operation 2-2, 2-3, 2-4, 2-5, 7-7 namelist group object 11-35 OPERATOR namelist input/output 11-33 ~ operator interface block Index ______D-9 operator 3-3, 7-1, 7-3, 7-8, 7-10, POSITION= specifier 11-42, 11-45, 7-13, 7-14, 7-19 11-47, 11-51 operator function 7-15, 13-18 positional argument 13-45 operator interface block 7-15 positioning 11-5, 11-39, 11-52 operator precedence 7-19 precedence 7-4, 7-11, 7-19 OPTIONAL attribute 9-7, 13-57 preceding record 11-5 optional dummy argument 13-57 precision 2-2, 14-33 OPTIONAL statement 9-25 PRECISION function 14-7, 14-33 ordering of statements 1-8 preconnected file or unit 11-6, 11-7 OUT -t INTENT attribute prefix 13-11, 13-19 output -t input/output present (argument) 13-57, 14-33 output argument 9-6, 13-42, 13-58 PRESENT function 14-7, 14-33 output list 11-16 PRINT statement 11-19 output statements 11-8 printing 11-41 overloaded subprogram name 13-36 private 2-12, 9-8, 9-27 own array specification 9-12 PRIVATE attribute 9-8 own length specification 9-12,9-16,9-17 PRIVATE statement 9-27 procedure -t subprogram P edit descriptor 12-20 processor -t Fortran processor PACK function 14-7, 14-33 processor time 14-18 PAD= specifier 11-42, 11-45, 11-47 processor-dependent character set padding character 8-5, 11-14, 11-23, A-I 11-44, 11-45, 11-51, 12-8 PRODUCT function 14-7, 14-34 PARAMETER attribute 9-7 program 1-1, 13-1 PARAMETER statement 9-25 program line 1-1 parent object vii PROGRAM statement 13-2 parenthesized expression 7-20 program unit 1-1, 13-1 partially associated 4-16 pseudorandom number 14-34 pending control mask 8-14 public 2-12, 9-9,9-27 pointer 4-1, 5-1, 9-8, 13-52, 9-26 PUBLIC attribute 9-9 pointer assignment statement 8-10 PUBLIC statement 9-27 pointer association 4-14 pure function 13-10, 13-15, 13-39 POINTER attribute 9-8 PURE prefix 13-11, 13-19 pointer component 2-9, 2-10 pure subroutine 13-10, 13-20, 13-39 pointer function 13-13 pointer nullification 5-6 RADIX function 14-7, 14-34 POINTER statement 9-26 RANDOM_NUMBER subroutine pointer target 5-2 14-9, 14-34 position RANDOM_SEED subroutine 14-9, array element 4-8, 4-9 14-34 character substring 4-4 range 9-22, 10-14, 10-15, 11-17, 14-35 file 11-5 RANGE function 14-7. 14-35 D-10 ______lndex rank 4-1,4-7,6-7 READ statement 11-19 S edit descriptor 12-22 READ= specifier 11-47 SAVE attribute 9-9 reading 11-1 SAVE statement 9-28 READWRITE= specifier 11-47 saved variable 4-18, 9-9 real type scalar 4-1, 4-4 REAL function 14-2, 14-7, 14-12, scale factor 12-20 14-35 SCALE function 14-8, 14-36 REAL statement 9-14 SCAN function 14-8, 14-37 real-time clock 14-40 scope 3-1 REC= specifier 11-10 scoping unit 3-1 RECL= specifier 11-42, 11-45, 11-47 section subscript 6-6 record 11-1 SELECTED _INT _KIND function record length 11-4, 11-42, 11-45, 11-47 14-8, 14-37 record number 11-4, 11-10 SELECTED _REAL_KIND function RECURSIVE prefix 13-11, 13-14, 14-8, 14-37 13-19, 13-20 selector 10-10 recursive function 13-14 SELECT CASE statement 10-10 recursive subroutine 13-20 separator reference -r vii format specification 12-1 assignment subroutine 8-8 internal input 11-32 function 13-16 list-directed input 11-26 module 13-4 namelist input 11-35 operator function 7-16 statement 1-2 statement function 13-31 sequence association 13-52 subroutine 13-21 SEQUENCE statement 2-6 relational expression 7-8 SEQUENCE attribute 2-6 relational operator 7-8 sequence type 2- 7 repeat factor 11-29, 11-37 sequential access 11-3 REPEAT function 14-8, 14-36 SEQUENTIAL= specifier 11-47 repeat specification 12-4 set of values 2-1, 2-2, 2-3, 2-4, 2-5 repeatable edit descriptor 12-6 SET_EXPONENT function 14-8, representable character 3-7 14-37 restricted expression 7-26 shape 4-1,4-7,6-7 RESHAPE function 14-8, 14-36 SHAPE function 14-8, 14-38 RESULT 13-11, 13-12, 13-14, 13-37 side effect 6-5, 6-7, 7-21, 8-16, 8-22 result variable 13-11, 13-38 sign control edit descriptor 12-22 return 13-39 SIGN function 14-8, 14-12, 14-38 RETURN statement 13-39 significand 12-13 reversion (of format control) 12-4 simple executable statement 1-7 REWIND statement 11-52 SIN function 14-8, 14-12, 14-38 RRSPACING function 14-8, 14-36 SINH function 14-8, 14-12, 14-38 Index ______D-11

SIZE function 14-8, 14-38 structure component 4-9 size of an array 4-7, 6-6, 14-38 structure constant 2-14 SIZE= specifier 11-14 structure constructor 2-13 edit descriptor 12-22 structure object 2-13, 4-1 SNGL function 14-2, 14-7, 14-12 subobject 4-2, 4-3, 4-4 source form 1-1 subprogram 13-1, 13-8 SP edit descriptor 12-22 subprogram definition 13-11, 13-19, SPACING function 14-8, 14-39 14-10 special character 1-1 subprogram interface 13-9 special expression 7-23 subroutine 13-18 special name 3-3 reference, invocation 13-21 specific function 14-1, 14-10 definition 13-19 specific interface block 13-32, 13-34 SUBROUTINE statement 13-19 specific name 13-11, 13-19, 14-1, 14-10 subscript expression 6-5, 6-7 specification expression 7-26 subscript list 6-5 specification part 13-2, 13-3, 13-6, subscript value sequence 6-6, 6-9 13-11, 13-19 subscript-triplet 6-9 specification statement 9-1 substring 4-4 SPREAD function 14-8, 14-39 SUM function 14-8, 14-39 SQRT function 14-8, 14-12, 14-39 SYSTEM_CLOCK subroutine 14-9, edit descriptor 12-22 14-40 standard unit 11-7 starting position 4-4 T edit descriptor 12-23 STAT= 5-2, 5-5, 6-14 tabulator edit descriptor 12-23 statement function 13-29 TAN function 14-8, 14-12, 14-40 statement labell-I, 1-2, 1-4, 3-3 TANH function 14-8, 14-12, 14-40 statement ordering 1-8 target 5-1 statement separator 1-2 TARGET attribute 9-10 status variable 5-2, 5-5, 6-14 TARGET statement 9-30 status temporary file 11-45 allocation status 6-15 terminal point (of a file) 11-5 association status (of a pointer) 5-3 THEN -t IF THEN statement definition status 4-16 TINY function 14-9, 14-40 input/output status information TL edit descriptor 12-23 11-11, 11-42, 11-44, 11-46, token -t lexical token 11-47, 11-52 totally associated 4-16 STATUS= specifier 11-42, 11-45, 11-46 TR edit descriptor 12-23 STOP statement 10-23 TRANSFER function 14-9, 14-41 storage association 4-14, 9-33 transfer of control 10-1 storage sequence 2-6, 4-14, 4-15 transformational function 14-1 storage unit 4-14 TRANSPOSE function 14-9, 14-41 stride 6-9,6-18,9-22,10-15,11-17 TRIM function 14-9, 14-41 D-12 ______lndex type 2-1 WHERE statement 8-11 type component definition 2-7 WHILE loop 10-14, 10-16, 10-19 type concept 2-1 whole array 6-4 type conversion 7-5, 14-2 WRITE statement 11-19 type declaration statement 9-11 WRITE= specifier 11-47 type definition 2-5, 2-12 writing 11-1 type specification 1-4, 9-11, 13-11 TYPE statement X edit descriptor 12-24 type declaration 9-18 type definition 2-6 Z edit descriptor 12-25 zero-length character string 2-4, UBOUND function 14-9, 14-41 7-22 ultimate component 2-7 zero-size array 6-2, 7-22 unconditional GO TO 10-2 undefined 4-3, 4-16, 4-18, 5-3 .AND. 7-10 unformatted .EQ. 7-8 file 11-5 .EQV. 7-10 input/output 11-24 .FALSE. 3-6 record 11-1 .GE. 7-8 UNFORMATTED= specifier 11-47 .GT. 7-8 unit 11-6 .LE. 7-8 unit number 11-9 .LT. 7-8 UNIT= specifier 11-9, 11-42, .NE. 7-8 11-44, 11-46, 11-47 .NEQV. 7-10 UNPACK function 14-9, 14-42 .NOT. 7-10 unspecified storage unit 4-15 .OR. 7-10 upper array bound 6-1 .TRUE. 3-6 USE association 4-12, 13-5 -- 7-8 USE statement 13-4 >= 7-8 > 7-8 value list 6-18 <= 7-8 value separator 11-26 < 7-8 variable vii, 4-1, 4-3 /= 7-8 variable (dummy) array 4-7,6-1,13-51 => 8-10 variable format specification 12-2 vector subscript 6-11 VERIFY function 14-9, 14-42 visible 2-12, 9-9, 9-28 where-block 8-13 WHERE construct 8-12 WHERE construct statement 8-12