Digital PDFs
Documents
Guest
Register
Log In
AA-Y868C-TK
February 1987
86 pages
Original
2.2MB
view
download
Document:
FORTRAN-10/20 and VAX FORTRAN Compatibility Manual
Order Number:
AA-Y868C-TK
Revision:
000
Pages:
86
Original Filename:
OCR Text
FORTRAN-10/20 and VAX FORTRAN Compatibility Manual Order Number: AA-Y868C-TK February 1 987 This document describes the similarities and differences between FORTRAN-10/20 and VAX FORTRAN. This manual supersedes the FORTRAN-10j20 and VAX FORTRAN Compatibility Manual, order number AA-Y868B-TK. Operating System and Version: TOPS-10 V7.03 TOPS-20 V4.1, V6.1 VAX/VMS V4.5 Software Version: digital equipment corporation maynard, massachusetts FORTRAN-10 V 11 " FORTRAN-20 V 11 VAX FORTRAN V4.5 First Printing, August 1983 Revised, May 1985 Revised, February 1 987 The information in this document is subject to change without notice and should not be construed as a commitment by Digital Equipment Corporation. Digital Equipment Corporation assumes no responsibility for any errors that may appear in this document. The software described in this document is furnished under a license and may be used or copied only in accordance with the terms of such license. No responsibility is assumed for the use or reliability of software on equipment that is not supplied by Digital Equipment Corporation or its affiliated companies. Copyright © 1983, 1987 Digital Equipment Corporation All Rights Reserved. Printed in U.S.A. The postpaid READER'S COMMENTS form on the last page of this document requests the user's critical evaluation to assist in preparing future documentation. The following are trademarks of Digital Equipment Corporation: DEC DECmate DECUS DECwriter DIBOL MASSBUS MicroVAX PDP PIOS Professional Q-BUS Rainbow RSTS RSX RT UNIBUS VAX VAXBI VAXELN VMS VT Work Processor ~U~UD~U CONTENTS CHAPTER 1 INTRODUCTION CHAPTER 2 EXTENSIONS PROVIDED BY FORTRAN-10/20 AND VAX FORTRAN 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 CHAPTER 3 3.1 3.2 3.3 3.4 3.5 3.5.1 3.5.2 3.5.3 3.5.4 3.5.5 3.5.6 3.5.7 3.5.8 3.6 3.7 3.7.1 2-1 · · · · · ·· ·· ·· 2-3 2-3 · · · · · · · · · · · · ·· 2-8 2-12 · · · · · · · ·· ·· ·· ·· 2-15 2-16 · · · · · 2-17 · 2-21 ········ CHARACTERS AND LINES COMPILATION CONTROL STATEMENTS DATA TYPES SPECIFICATION AND DATA STATEMENTS EXPRESSIONS FUNCTIONS AND SUBROUTINES CONTROL STATEMENTS I/O STATEMENTS FORMATTING FORTRAN-10/20 AND VAX FORTRAN INCOMPATIBILITIES · ·· ·· · · · · · · · · ·· ·· ·· ·· · ·· · · · · · ·· .·········· · · ········ · ·· ·· ········· · · · ·· ·· ·· ·· ··· · ·· PROGRAM FORMAT 3-1 ARGUMENT PASSING 3-2 3-4 LOGICAL TESTS THE ASSIGNED GOTO STATEMENT 3-5 3-5 I/O INCOMPATIBILITIES Default Filenames Associated with Units 3-6 Unit 5 for Both Input and Output 3-6 STATUS='NEW' and File Generation (Version) Numbers 3-7 STATUS='UNKNOWN' and File Generation (Version) Numbers 3-7 The CARRIAGECONTROL= Specifier 3-7 The RECL= Specifier and Formatted Sequential Files 3-8 ASSOCIATEVARIABLE= Specifier 3-9 ACCESS='APPEND' and REWIND 3-9 INQUIRE STATEMENT 3-9 THE OPEN STATEMENT 3-9 Standard OPEN Specifiers 3-10 iii 3.7.2 3.7.3 3.7.4 3.7.5 3.8 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9 3.10 3.10.1 3.10.2 3.10.3 3.10.4 3.10.5 3.11 3.12 3.13 3.13.1 3.13.2 3.13.3 3.13.4 3.13.5 3.13.6 3.13.7 3.13.8 OPEN Specifiers Common to FORTRAN-10/20 and VAX FORTRAN OPEN Specifiers Only in FORTRAN-10/20 ••••••••• OPEN Specifiers Only in VAX FORTRAN • • • • • • • • • • • • Conversion of OPEN Statements THE CLOSE STATEMENT • • • • • • • Standard CLOSE Specifiers CLOSE Specifiers Common to FORTRAN-10/20 and VAX FORTRAN CLOSE Specifiers Only in FORTRAN-10/20 ••••• CLOSE Specifiers Only in VAX FORTRAN • • • • • • • • • • Conversion of CLOSE Statements • CARRIAGE CONTROL • • • • • • FORMAT EDIT DESCRIPTORS Interaction of the X and $ Edit Descriptors • • • • • • • • • • Interaction of the $ Edit Descriptor and Carriage-Control Characters • • • • • • • • • • • F, E, D, and G Edit Descriptors o and Z Edit Descriptors • • Default Field Widths • • • • INCLUDE STATEMENT • • • • • PROGRAM STATEMENT • • • • • • FORTRAN-SUPPLIED SUBPROGRAMS • Functions That Are Generic Only in FORTRAN-10/20 • • • • • Functions That Are Generic Only in VAX FORTRAN • • • • • • Generic Functions Only Available in VAX FORTRAN • • • • • • Intrinsic Functions Only Available in FORTRAN-10/20 • Intrinsic Functions Only Available in VAX FORTRAN • • INTEGER Function Differences DOUBLE-PRECISION COMPLEX Functions • • • • • • • • • Similar Subroutines in FORTRAN-10/20 and VAX FORTRAN iv 3-11 3-12 3-13 3-13 3-15 3-15 3-16 3-16 3-17 3-17 3-18 3-19 3-19 3-19 3-20 3-20 3-21 3-23 3-23 3-23 3-24 3-24 3-25 3-25 3-25 3-27 3-28 3-30 3.13.9 3.13.10 CHAPTER 4 4.1 4.1.1 4.1.2 4.1.3 4.2 4.2.1 4.2.2 4.2.3 4.2.4 Subroutines Only Available in FORTRAN-10/20 •••••• 3-31 Subroutines Only Available in VAX FORTRAN • • • • • • • • • 3-33 SOFTWARE AND HARDWARE LIMITS · · · · · · · ·· 4-1 4-1 4-2 · · ·· · · · · ··· 4-3 4-4 4-4 · · · · · ·· 4-5 4-6 . . · · · · · · · · · · · · 4-8 SOFTWARE LIMITS Number of Continuation Lines Other Compiler Limits I/O Limits HARDWARE LIMITS The INTEGER Data Type The LOGICAL Data Type The CHARACTER and Hollerith Data Types The Floating-Point Data Types TABLES 3-1 3-2 4-1 4-2 4-3 4-4 4-5 4-6 Default Field Widths for Edit Descriptors VAX-II FORTRAN INTEGER Function Names Compiler Imposed Limitations Maximum Record Lengths Integer Number Format Logical Data Types .. Characters per FORTRAN Data Type Floating-Point Number Formats ········· ...········· 3-22 3-28 4-3 4-4 4-5 4-6 4-7 4-11 · · · ·· · · · · · · ··· · v CHAPTER 1 INTRODUCTION This manual describes the similarities and differences between FORTRAN-l0/20 Version 11 and VAX FORTRAN versionl 4.5. This manual is intended for users who may want to transport FORTRAN-10/20 programs to a VAX computer, or transport VAX FORTRAN programs to a DECsystem-10/20 computer. This manual describes any incompatibilities of the implementation of language features between these FORTRAN versions. It also notes any features provided by one FORTRAN version and not by the other. Both FORTRAN-10/20 and VAX FORTRAN are based on American National Standard FORTRAN (ANSI X3.9-l978), referred to as FORTRAN-77. Both VAX FORTRAN and FORTRAN-10/20 are compatible with FORTRAN-77 at the full-language level. Both compilers provide many extensions and additions to the FORTRAN-77 standard. This manual describes the extensions to FORTRAN-77 for both compilers. Both compilers support a compatibility flagger, invoked by a compiler switch, which flags features that are extensions to the FORTRAN-77 standard. The FORTRAN-l0/20 flagger also flags features that are incompatible with VAX FORTRAN. In addition, this manual discusses the differences in software limits imposed by the two compilers, and describes how the FORTRAN data types are represented by the hardware of the DECSYSTEM-l0/20 and VAX computers. 1-1 INTRODUCTION NOTE When 'word' is used in this manual, it refers to either a 32-bit word on VAX systems, or to a 36-bit word on FORTRAN-10/20 systems. See the following FORTRAN-10/20: documents for more information on • TOPS-10/TOPS-20 FORTRAN (AA-N383B-TK, AD-N383B-Tl) Language Manual • TOPS-l0/TOPS-20 (AA-P529C-TK) FORTRAN Pocket Guide See the following documents for more information on FORTRAN: • Programming in VAX FORTRAN (AA-D034D-TE) • VAX FORTRAN User's Guide (AA-D035D-TE) • VAX FORTRAN Language Summary (AV-M763B-TE) • VAX FORTRAN Installation Guide/Release Notes 1-2 VAX CHAPTER 2 EXTENSIONS PROVIDED BY FORTRAN-l~/2~ AND VAX FORTRAN This chapter describes the extensions to the FORTRAN-77 standard provided by FORTRAN-l~/2~ and VAX FORTRAN. 2.1 CHARACTERS AND LINES • Comment lines Both FORTRAN-l~/2~ and VAX FORTRAN allow comment lines to begin with characters other than C or * (asterisk) in column one. VAX FORTRAN also allows comment lines to begin with (exclamation" point) in column one, and FORTRAN-l~/20 allows comment lines to begin with!, $ (dollar sign), and / (slash) in column one. • Comment on statements Both FORTRAN-l~/20 and VAX FORTRAN allow any line of a program to be commented. If a ! (exclamation point) appears in the statement field of any line (except in a character or Hollerith constant), then the rest of the line is considered a comment. 2-1 EXTENSIONS PROVIDED BY FORTRAN-19/29 AND VAX FORTRAN • DEBUG lines Supported by FORTRAN-19/29 and VAX FORTRAN. As an aid to debugging, a 0 in column one of any line causes that line to be interpreted as a comment line. However, the /INCLUDE switch to FORTRAN-19/29 and the /0 LINES' qualifier to VAX FORTRAN causes the compiler to treat the 0 in column one as a space, so that the remainder of the line is compiled as an ordinary (noncomment) line. This allows the program to contain statements only useful for debugging, without sacrificing object program size or execution time when not debugging. • Long identifiers Supported by VAX FORTRAN Both allow identifiers characters long. • and to FORTRAN-19/29. be up to 31 Multi-Statement lines Supported by FORTRAN-10/20. Not supported by VAX FORTRAN. FORTRAN-10/20 allows users to place more than one statement per line. Multiple statements on a line are separated by semicolons. For example: DIST=RATE*TIME; TIME=TIME+0.5; CALL PRIME • Special characters in identifiers Supported by VAX FORTRAN and FORTRAN-10/20. Identifiers may contain the special characters $ (dollar sign) and _ (underscore). 2-2 EXTENSIONS PROVIDED BY 2.2 FORTRAN-l~/2~ AND VAX FORTRAN COMPILATION CONTROL STATEMENTS • INCLUDE statement Supported by FORTRAN-l~/2~ and VAX FORTRAN. The INCLUDE statement directs the compiler to insert the contents of the designated file immediately following the INCLUDE statement. This allows programs to share common code or declarations by placing them in an INCLUDE file. (See Section 3.11 for the incompatibilities between the FORTRAN-l~/20 and VAX FORTRAN INCLUDE statements.) • OPTIONS statement Supported by VAX FORTRAN. Not supported by FORTRAN-10/20. The OPTIONS statement allows the programmer to give the compiler directives controlling the compilation of the program. 2.3 DATA TYPES • Alternate number format for DOUBLE PRECISION Both FORTRAN-10/20 and VAX FORTRAN allow the user to specify, when compiling a program unit, which floating-point number format (D-floating or G-floating) is used to store DOUBLE-PRECISION quantities. You specify which format with the /DFLOATING and /GFLOATING switches for FORTRAN-10/20, and with the /G FLOATING and /NOG FLOATING qualifiers for VAX FORTRAN. - 2-3 EXTENSIONS PROVIDED BY FORTRAN-le/2e AND VAX FORTRAN D-floating has less range, but more preCiSion, than G-floating (see Section 4.2.4). FORTRAN-le/2e supports G-floating only on KL10 model B processors. VAX FORTRAN supports G-floating on all VAX processors. However, processors without the extended floating-point feature emulate G-floating instructions in the software, and thus run slower. data • BYTE LOGICAL*l) • type (BYTE is Supported by VAX FORTRAN-10/2e. FORTRAN. COMPLEX*16 COMPLEX) type data a synonym for Not supported by (synonym for DOUBLE Supported by VAX FORTRAN. Not supported by FORTRAN-10/20. FORTRAN-le/20 acts differently if you declare COMPLEX*16 data with the DOUBLE COMPLEX statement, instead of with a COMPLEX statement with a length attribute of 16. If you use the DOUBLE COMPLEX statement, a fatal error message is issued; if you use the COMPLEX*16 statement, a warning is given and the COMPLEX*8 data is used. FORTRAN-10/20 does provide subroutines that take arguments of two-element DOUBLE PRECISION arrays, and that calculate DOUBLE COMPLEX transcendental functions. • Hexadecimal constants (typeless) Supported by VAX FORTRAN-10/20. FORTRAN. 2-4 Not supported by EXTENSIONS PROVIDED BY • FORTRAN-10/2~ AND VAX FORTRAN Hollerith constants of the form 'ccc' Supported by FORTRAN-l~/20 and VAX FORTRAN. Both FORTRAN-10/20 and VAX FORTRAN use the context of the expression to determine if a constant of the form I CCC ' is a Hollerith constant or a FORTRAN-77 string constant. If the constant is the actual argument of a subprogram, both FORTRAN-10/20 and VAX FORTRAN provide the linker with enough information to determine the type of the constant at load-time. • Hollerith constants of the form nHccc Supported by FORTRAN-l0/20 and VAX FORTRAN. Incompatibility: FORTRAN-10/20 right-pads all Hollerith constants with blanks until they reach a word boundary. VAX FORTRAN does not pad Hollerith constants used as actual arguments to subprograms. • INTEGER*2 data type Supported by VAX FORTRAN. FORTRAN-10/20 a warning and uses INTEGER*4. • LOGICAL*1 data type Supported by VAX FORTRAN. FORTRAN-10/20 a warning message and uses LOGICAL*4. • gives LOGICAL*2 data type Supported by VAX FORTRAN. FORTRAN-10/20 a warning message and uses LOGICAL*4. • gives octal MIL-Standard-1753 constants and gives hexadecimal Supported by FORTRAN-10/20. Not supported by VAX FORTRAN. These constants are used only in DATA statements. 2-5 EXTENSIONS PROVIDED BY • FORTRAN-l~/2~ Mixing CHARACTER and COMMON or EQUIVALENCE AND VAX FORTRAN non-character data in Supported by FORTRAN-10/20 and VAX FORTRAN. If /FLAG:ANSI is in effect, FORTRAN-10/20 produces a warning message about this nonstandard use of COMMON or EQUIVALENCE. VAX FORTRAN produces the warning if /STANDARD is in effect. • Octal cons~ants (typeless) Supported by FORTRAN-10/20 and VAX FORTRAN, although with different syntax. Also, when assigning a single-word octal constant to a double-word variable, FORTRAN-10/20 sets the high-order word to the constant, and sets the low-order word to zero; VAX FORTRAN sets the the high-order word to zero, and sets the low-order word to the constant. Conversely, if a double-word octal constant is assigned to a single-word variable, FORTRAN-l0/20 truncates the constant on the right, and VAX FORTRAN truncates the number on the left. Also, VAX FORTRAN does not allow double-word octal constants as actual arguments to subprograms. • Octal constants of type INTEGER Supported by VAX FORTRAN. FORTRAN-l0/20 typeless octal constants have the same syntax and will work in most contexts as the VAX integer octal constants. The most notable exception is mixed-mode expressions, such as: R = "1 + 1.0 VAX FORTRAN will assign R the value 2.0. does not convert the octal constant, and so adds a very small, unnormalized floating-point number to 1.0. FORTRAN-10/2~ 2-6 EXTENSIONS PROVIDED BY FORTRAN-10/20 AND VAX FORTRAN • RADIX-50 constants in DATA statements Supported by VAX FORTRAN-10/20. • FORTRAN. Not supported by REAL*16 data type Supported by VAX FORTRAN. FORTRAN-10/20 gives a warning and uses REAL*8. REAL*16 is the VAX H-floating number format (see Section 4.2.4), which is available on all VAX processors. However, processors without the extended floating-point feature emulate H-floating instructions in the software, and thus run slower. • RECORD data type Supported by VAX FORTRAN. Not supported by FORTRAN-10/20. RECORD is a data item that can be composed of multiple fields containing aggregate and scalar data items with any mix of the VAX FORTRAN data types. • Symbolic constant used as part of COMPLEX constant real or imaginary Supported by FORTRAN-10/20 and VAX FORTRAN. 2-7 EXTENSIONS PROVIDED BY FORTRAN-lg/2g AND VAX FORTRAN 2.4 SPECIFICATION AND DATA STATEMENTS • Alternate form of the PARAMETER statement Both FORTRAN-lg/2g and VAX FORTRAN PARAMETER statements of the form: allow PARAMETER p=c[,p=c ••• ] where p is a symbolic name, and c is a compile-time constant expression. When this form of the PARAMETER statement is used, the type of the symbolic name is determined by the type of constant, rather than the implicit or explicit type of the name. This feature is for compatibility with earlier versions of FORTRAN-lg/2g and VAX FORTRAN. • Compatibility mode for EXTERNAL statements Both FORTRAN-lg/2g and VAX FORTRAN allow the user to specify at compile-time that the EXTERNAL statements in a program should be processed as FORTRAN IV EXTERNAL statements. FORTRAN IV EXTERNAL statements can be used to declare a symbolic name as being the name of FORTRAN library routine, as well as the name of a user-supplied subprogram. Both FORTRAN-10/20 and VAX FORTRAN extend the syntax of FORTRAN IV EXTERNAL statements. They allow a user-supplied subprogram that has the same name as a FORTRAN library routine to be declared if its name is preceded by an asterisk in the EXTERNAL statement. • DICTIONARY statement Supported by VAX FORTRAN. Not supported by FORTRAN-10/20. This statement incorporates VAX Common Data Dictionary data definitions into the current FORTRAN source file during compilation. 2-8 EXTENSIONS PROVIDED BY • FORTRAN-l~/2~ AND VAX FORTRAN Easy EQUIVALENCE of multidimensional arrays Supported by FORTRAN-I 0/20 and VAX FORTRAN. Multidimensional arrays may be equivalenced by specifying only one subscript. For example: DIMENSION TABLE(2,2), TRIPLE(2,2,2) EQUIVALENCE (TABLE(4) ,TRIPLE(7» may be used instead of: DIMENSION TABLE(2,2), TRIPLE(2,2,2) EQUIVALENCE (TABLE(2,2),TRIPLE(I,2,2» • IMPLICIT NONE statement Supported by' VAX FORTRAN and FORTRAN-10/20. The IMPLICIT NONE statement is used to remove all default data types, and thus requires that all identifiers be explicitly declared. Note that the program listing produced by FORTRAN-10/20 indicates which identifiers have not been explicitly declared. • Implied DO bounds Supported by For example: in DATA statements FORTRAN-10/20 and of substring VAX FORTRAN. DATA (C(I:I) , 1=6,10) /5*'*'/ • Length specifiers in FUNCTION statements Supported by FORTRAN-10/20 and VAX FORTRAN. The length specifier can be either after the data type in the FUNCTION statement, or after the function name in the statement. For example: REAL*8 FUNCTION SIMPSN(A, B, F) REAL FUNCTION SIMPSN*8(A, B, F) 2-9 EXTENSIONS PROVIDED BY FORTRAN-l9/2~ AND VAX FORTRAN • Numeric data type length specifiers Supported by FORTRAN-l~/2~ and VAX FORTRAN. You can specify the length of numeric data in type declaration statements. For example: REAL*8 X, Y*4, • Z{l~)*4, A Numeric initialization of CHARACTER variables Supported by VAX FORTRAN. Not supported by CHARACTER variables with a length of one may be initialized using numeric constants in DATA or type declaration statements. The character is initialized to the character whose ASCII code is specified by the numeric constant. FORTRAN-l~/20. Both compilers support an alternate way to initialize CHARACTER variables based on a given ASCII code. FORTRAN-l~/20 and VAX FORTRAN support the function CHAR in compile-time constant expressions. Therefore, CHAR can be used in a PARAMETER statement to form a symbolic constant, and the symbolic constant could be used in a DATA statement to initialize a CHARACTER variable. For example: CHARACTER*l LINEFD, CHARI PARAMETER (LINEFD=CHAR(10» DATA CHARI/LINEFD/ • RECORD statement Supported by VAX FORTRAN. Not supported by FORTRAN-10/20. The RECORD statement creates a record of the form specified in a previously declared structure. 2-10 EXTENSIONS PROVIDED BY • FORTRAN-l~/2~ AND VAX FORTRAN STRUCTURE and END STRUCTURE statements Supported by VAX FORTRAN. Not supported by These statements define the structure or form of a record. The STRUCTURE statement indicates the beginning of a structure declaration, and the END STRUCTURE statement indicates the end of a structure declaration. FORTRAN-l~/2~. • Value initialization statements in type declaration Supported by VAX FORTRAN. Not supported by Type declarations and DATA statements may be combined. For example: FORTRAN-l~/2~. A(10)/5*~.,5*1./ REAL X/-l./, • VIRTUAL statement (synonym statement) for the DIMENSION Supported by VAX FORTRAN for compatibility with PDP-II FORTRAN. Not supported by FORTRAN-l~/2~. • VOLATILE statement Supported by VAX FORTRAN. Not supported by The VOLATILE statement prevents all optimization from being performed on the variables, arrays, or common blocks that it identifies. FORTRAN-l~/20. 2-11 EXTENSIONS PROVIDED BY 2.5 FORTRAN-l~/2~ AND VAX FORTRAN EXPRESSIONS • Alternate syntax for relational operators Supported by FORTRAN-1~/2~. Not supported by VAX FORTRAN. FORTRAN-1~/2~ allows the relational operators to be specified by the following special characters: > >= < <= i for for for for for for .GT. .GE. .LT. .LE. .EQ. .NE. • Concatenation of length * operands Supported by FORTRAN-1~/2~ and VAX FORTRAN. Except in character assignment statements, the FORTRAN-77 standard forbids any character expression that involves the concatenation of an operand whose length specification is an asterisk in parentheses, unless the operand is the symbolic name of a constant. Neither FORTRAN-1~/20 nor VAX FORTRAN has this restriction. • Consecutive arithmetic operators Supported by FORTRAN-1~/2~ and VAX FORTRAN, although with different precedence rules. An example of an expression with two consecutive ope r a to r sis: x = A ** -8 * C This expression is not permitted by the FORTRAN-77 standard because the exponentiation operator is adjacent to the negation operator. FORTRAN-10/20 interprets the above statement as: X (A ** (-8» 2-12 * C EXTENSIONS PROVIDED BY FORTRAN-10/20 AND VAX FORTRAN VAX FORTRAN interprets the statement as: X = A ** • (- (B*C)) Extended compile-time constant expressions VAX FORTRAN allows the following functions to be used to form compile-time constant expressions: ABS, CHAR, CMPLX, CONJG, DIM, DPROD, lAND, ICHAR, IEOR, IMAG, lOR, ISHFT, LGE, LGT, LLE, LLT, MAX, MIN, MOD, NINT, and NOT. FORTRAN-10/20 allows the following functions to be used to form compile-time constant expressions: CHAR, ICHAR, lAND, and lOR. • General numeric expressions in INTEGER required contexts where Both FORTRAN-10/20 and VAX FORTRAN allow any type of numeric expression in the following contexts where the FORTRAN-77 expressions are standard requires an INTEGER expression: • • • • • The values of I/O statement specifiers Subscript expressions Substring bounds expressions Index of computed GOTO statements Index of a RETURN statement In addition, VAX FORTRAN allows any type of numeric expressions in the following contexts where FORTRAN-10/20 requires an INTEGER expression: • Implied DO loop bounds in DATA statements • The upper and declarations 2-13 lower limits of array EXTENSIONS PROVIDED BY FORTRAN-19/20 AND VAX FORTRAN Any noninteger numeric expression in these contexts is converted to INTEGER before use (any fractional part is truncated). • LOGICAL expressions in numeric contexts Supported by FORTRAN-10/20 and VAX FORTRAN. However, VAX FORTRAN always treats the LOGICAL expression as an INTEGER, and FORTRAN-10/20 treats the LOGICAL expression as a typeless quantity (a bit string). • Numeric expressions in LOGICAL contexts Supported by FORTRAN-10/20. Supported to some extent by VAX FORTRAN. FORTRAN-10/20 treats any numeric expression in a LOGICAL context as if it was a LOGICAL value (bit string). VAX allows any INTEGER expression to appear in a LOGICAL context and treats the INTEGER expression as a LOGICAL value. VAX FORTRAN only allows other types of numeric expressions to appear in one LOGICAL context: that of a numeric expression assigned to a LOGICAL variable. The numeric expression is converted to INTEGER and assigned to the LOGICAL variable as if it was a LOGICAL value. • Numeric scalars or CHARACTER required arrays in contexts where For compatibility with older programs, both FORTRAN-10/20 and VAX FORTRAN allow numeric scalars and arrays that contain Hollerith data expressions are to be used in some contexts where CHARACTER expressions are required. Examples of such contexts are OPEN and CLOSE statement keywords and arguments to FORTRAN-supplied subroutines such as DATE. 2-14 EXTENSIONS PROVIDED BY FORTRAN-l~/2~ AND VAX FORTRAN • Overlap on CHARACTER assignments Supported by FORTRAN-l0/20 and VAX FORTRAN. The FORTRAN-77 standard forbids the right hand side of a CHARACTER assignment statement from referencing any of the character positions of the CHARACTER variable or substring on the left hand side of the assignment. For example, such an overlapping assignment statement follows: C(2:) =C FORTRAN-l0/20 and VAX FORTRAN allow overlap on character assignments. They always treat character assignments as if the right side of the assignment was assigned to a temporary variable, and then assigned to the variable or substring on the left of the assignment statement. • .XOR. logical operator (Synonym for .NEQV.) Supported by 2.6 FORTRAN-10/2~ and VAX FORTRAN. FUNCTIONS AND SUBROUTINES • Access to addresses of storage elements Supported by VAX FORTRAN. Not supported by FORTRAN-10/20. The %LOC built-in function returns the address of its argument. This is most useful in creating argument blocks for VAX/VMS system service routines. • Syntax for alternate return labels FORTRAN-10/20 allows the characters $ (dollar sign), & (ampersand), and * (asterisk) to be used to indicate alternate return labels. VAX FORTRAN allows the characters & (ampersand) and * (asterisk). 2-15 EXTENSIONS PROVIDED BY FORTRAN-l9/20 AND VAX FORTRAN • User controlled argument passing mechanisms Supported by VAX FORTRAN. Not supported by FORTRAN-10/20. By using the functions %VAL, %REF, or %DESCR, a user can control whether an argument is passed by value, by reference, or by descriptor. This allows VAX/VMS system se~vice routines to be called directly from FORTRAN. 2.7 CONTROL STATEMENTS • Compatibility mode for one trip DO loops Both FORTRAN-10/20 and VAX FORTRAN allow the user to specify at compile-time that the DO loops in a program are one trip (FORTRAN IV style) DO loops instead of zero trip (FORTRAN-77 style) DO loops. • DO WHILE statement Supported by FORTRAN-10/20 and VAX FORTRAN. • END DO statement Supported by FORTRAN-l 0/20 and VAX FORTRAN. This statement terminates a DO loop or DO WHILE loop without the need for a statement label. • Extended range DO loops, Supported by FORTRAN-10/20 and VAX FORTRAN. Extended range DO loops make it possible to transfer out of a loop, perform a series of statements elsewhere in the program, and then transfer back into the DO loop. 2-16 EXTENSIONS PROVIDED BY FORTRAN-lg/20 AND VAX FORTRAN • Two-branch LOGICAL IF Supported by FORTRAN-1.0/20. Not",supported by VAX FORTRAN. FORTRAN-10/20 allows LOGICAL IF statements to have both a true and false branch. For example: IF (X .GT. Y) 10,20 will branch to ~0 if X is gr~ater than otherwise it will branch to 20. ' 2.8 Y, I/O STATEMENTS • ACCEPT statement Supported by FORTRAN-10/20 and VAX FORTRAN. • Apostrophe form of recor,d specifier Supported by FORTRAN-10/20 and VAX FORTRAN. An apostrophe (I) may be used as ari alterriative to the REC= specifier in I/O statement control lists. • DECODE statement Supported by FORTRAN-l 0/20 and VAX FORTRAN. DECODE is similar to an internal file READ. In FORTRAN-10/20, the character count specified in DECODE statements "is interpreted as an internal record size in characters; and a / (slash) format descr'i ptor or indef ini te repeat causes the record pointer to advance to the next internal record. In VAX FORTRAN, the character count is interpreted as a total string count; and a / (slash) format descriptor or indefinite repeat, which for normal files causes a new record to be read or written, is illegal. DECODE is considered obsolete. 2-17 EXTENSIONS PROVIDED BY FORTRAN-l~/2~ AND VAX FORTRAN • DEFINE FILE statement Supported by VAX FORTRAN. Not supported by FORTRAN-l0/20. The DEFINE FILE statement is similar to the OPEN statement. DEFINE FILE is considered obsolete. • Default unit in WRITE statements Supported by FORTRAN-l0/20. Not supported by VAX FORTRAN. FORTRAN-l~/2~ allows WRITE statements of the form: WRITE f[,iolst] where f is an asterisk, format specifier, or namelist specifier. This provides symmetry with the FORTRAN-77 form of the READ statement with a default unit. • DELETE statement Supported by VAX FORTRAN and FORTRAN-10/2~. The DELETE statement removes a record from a relative (direct-access) or indexed file. • ENCODE statement Supported by FORTRAN-l~/2~ and VAX FORTRAN. ENCODE is similar to an internal file WRITE. In FORTRAN-l~/20, the character count in ENCODE statements is interpreted as an internal record si ze in characters; a / (slash) format descriptor or indefinite repeat causes the record pointer to advance to the next internal reco rd. In VAX FORTRAN, the character count is interpreted as a total string count. A / (slash) format descriptor or indefinite repeat, which for normal files causes a new record to be read or written, is illegal. ENCODE is considered obsolete. 2-18 EXTENSIONS PROVIDED BY FORTRAN-19/29 AND VAX FORTRAN • FIND statement Supported by FORTRAN-10/20 and VAX FORTRAN. The FIND statement can be used to pre-position random access relative files to al16w greater overlap of computation and I/O. • Indexed I/O Supported by VAX FORTRAN and FORTRAN-10/20. Indexed I/O allows records in files to be selected £or I/O using keys contained in the records. • I/O in I/O Supported by VAX FORTRAN. Not supported by FORTRAN-10/20. VAX FORTRAN allows a user function to do I/O even if the function was called from an I/O statement. Fo~ example, the statement: WRITE (5 , ' (IX, F10. 4) t) F (X) calls the function F. VAX FORTRAN allows the function F to do I/O to any unit except the unit referenced by the I/O statement that called the function. FORTRAN-10/20 will not allow a function called by an I/O statement to do I/O to any unit. The FORTRAN-77 standard forbids I/O statements from referencing any function if such a reference would cause another I/O statement to be executed. • List-directed interrial file I/O Supported by VAX FORTRAN-10/20. • FORTRAN. Not supported by NAMELIST statement Supported by FORTRAN-10/20 and VAX FORTRAN. However, FORTRAN-10/20 uses either FMT= or NML= as the optional specifier used to specify the NAMELIST name in I/O statements. VAX FORTRAN uses only NML= as the optional specifier. 2-19 EXTENSIONS PROVIDED BY FORTRAN-l0/20 AND VAX FORTRAN • Prompting during NAMELIST input Supported by VAX FORTRAN. Not supported by FORTRAN-10/20. VAX FORTRAN allows interactive display of the NAMELIST group and values by outputting the current group name or the name of the variables in response to a question mark (?) or an equal sign and question mark (=?). • PUNCH statement Supported by FORTRAN-10/20. VAX FORTRAN. • Not supported by REREAD statement Supported by FORTRAN-10/20. Not supported by VAX FORTRAN. The REREAD statement allows the last record read by a formatted READ or ACCEPT statement to be accessed again and reprocessed. This statement can be used to recover from certain types of errors. For example, the user may be able to recover from an "illegal character in data" error by reteading the same record using a different format. • REWRITE statement Supported by VAX FORTRAN and FORTRAN-l0/20. The REWRITE statement is used to update the record last read in an indexed file. • TYPE statement Supported by FORTRAN-10/20 and VAX FORTRAN. • UNLOCK statement Supported by VAX FORTRAN and FORTRAN-10/20. The UNLOCK statement unlocks a record in a relative or indexed file locked by a previous READ statement. 2-20 EXTENSIONS PROVIDED BY FORTRAN-le/2e AND VAX FORTRAN 2.9 FORMATTING • $ format edit descriptor Supported by FORTRAN-l0/20 and VAX FORTRAN. The $ (dollar sign) edit descriptor suppresses the output of a carriage return to end the current line during output operations. • Comma as an external formatted input field separator during Supported by VAX FORTRAN. Not supported by FORTRAN-10/20. ,VAX FORTRAN allows a comma to be used to' separate numeric data during formatted data input. For example, if the following statements: 10 READ (5,10) I, J, A., B-· FORMAT{216,2F10.2) read the record: 1,-2,1.0,35 then I=l, J=-2, A=1.0, 8=0.35 • Default widths for format edit descriptors Supported by FORTRAN-10/20 and VAX FORTRAN. For FORTRAN-10/20 output and VAX FORTRAN input or output, if the format edit descriptors I, 0, -Z, L, F, E, D, G, A, or R (FORTRAN-10/20 only) are used without specifying field width values, default values are ,supplied based on the data type of the I/O 1 ist .e1ement. FORTRAN-10/20 and VAX differ on the default field widths (see Section 3.10 •. 4). For FORTRAN-10/20 input, the data is scanned until a blank, comma, or character illegal for the specified edit descriptor is encountered (except for A format). 2-21 EXTENSIONS PROVIDED·BY FORTRAN-19/29 AND VAX FORTRAN CHARACTER I/O using • descriptor the Supported by FORTRAN-10/20. VAX FORTRAN. G format Not supported edit by • Numeric array elements to store formats Supported by VAX FORTRAN-10/20. • FORTRAN. Not supported by Numeric arrays to store formats Supported by FORTRAN-10/20 and VAX FORTRAN. Numeric arrays can contain Hollerith constants, which can be used as formats. • 0 (octal) format edit descriptor Supported by FORTRAN-10/20 and VAX FORTRAN. • Optional commas in formats Supported by FORTRAN-10/20 and VAX FORTRAN. Commas are not needed to separate format field descriptors if there is no ambiguity in how the format should be interpreted. For example, the following format is legal: 10 • FORMAT(lX'I is 'IS) Q format edit descriptor Supported by FORTRAN-10/20 and - VAX FORTRAN. The Q edit descriptor returns the number of characters left in the current record (valid only during input operations). 2-22 EXTENSIONS PROVIDED BY FORTRAN-lg/2g AND VAX FORTRAN • R format edit descriptor Supported by FORTRAN-l0/20. Not supported by VAX FORTRAN. The R edit descriptor is used to edit Hollerith data, and thus is similar to the A field descriptor. The difference between the R and A field descriptors is that the A descriptor works with left-justified Hollerith data, and the R descriptor works with right-justified Hollerith data with leading nulls. The R descriptor allows Hollerith characters to be stored one per word, and thus manipulated easily. • Variable format expressions Supported by VAX FORTRAN. Not supported by FORTRAN-10/20. VAX FORTRAN allows formats to contain an expression inclosed in angle brackets anywhere an integer constant is needed (except as the length of a Hollerith constant). The expression in angle brackets is evaluated at runtime and used in the format. For example, if J is 3, the format: 10 FORMAT(I<J+I» will act as if I4 was specified. • Z (hexadecimal) format edit descriptor Supported by FORTRAN-10/20 and VAX FORTRAN. )ECLIT AA CROSS Y868C ~ORTRAN-l0/20 and VAX FORTRAN compatability manual 2-23 CHAPTER 3 FORTRAN-19/20 AND VAX FORTRAN INCOMPATIBILITIES 3.1 PROGRAM FORMAT FORTRAN-l 0/20 and VAX FORTRAN have differences in the format of programs. several minor The tab character is treated differently by the two compilers when it appears in the statement field of a line. For the purpose of determining where the remark field begins, FORTRAN-10/20 counts the tab as being the number of spaces it appears to be in the listing. VAX FORTRAN counts the tab as being one character. Thus, part of a statement in the statement field as recognized by VAX FORTRAN may be in the remark field as recognized by FORTRAN-10/20. VAX FORTRAN has a /EXTEND_SOURCE qualifier, which specifies that the compiler is to extend the range of FORTRAN source text from columns 1 through 72 to columns 1 through 132. FORTRAN-10/20 does not have a similar qualifier, and always limits statements to columns 1 through 72. 3-1 FORTRAN-IO/20 AND VAX FORTRAN INCOMPATIBILITIES FORTRAN-10/20 and VAX FORTRAN treat the characters formfeed (control/L) and vertical tab (control/K) differently when they appear in source programs. FORTRAN-l 0/20 uses these characters (along with linefeed) to determine where the end of line is. VAX FORTRAN does not use these characters for this purpose (as it uses RMS to determine where the end of line is). VAX FORTRAN treats formfeeds as spaces when they appear outside of CHARACTER and Hollerith constants, and it gives an error message when it encounters vertical tabs outside one of those constants. Thus, a source program that is formatted with formfeeds should only have the form feeds following lines that have already been terminated by the normal method of the user typing a return. Both FORTRAN-10/20 and VAX FORTRAN allow nonprintable characters to be included in the source program (this is only useful in CHARACTER or Hollerith constants) • FORTRAN-10/20 does not allow the characters null, linefeed, vertical tab, formfeed, or carriage return to be entered directly into CHARACTER constants (TOPS-10 and TOPS-20 have system-wide conventions about the treatment of these characters). 3.2 ARGUMENT PASSING FORTRAN-10/20 and VAX FORTRAN use different mechanisms to pass arguments to subprograms. FORTRAN-10/20 passes scalar numeric arguments by value-result, and VAX FORTRAN passes scalar numeric arguments by reference. When arguments are passed by value-result, the subprogram is passed the values of its actual arguments. These values are then stored in local copies of the arguments, which the subprogram then processes. Before the subprogram returns, the values of the local copies of the arguments are copied back, into the actual arguments in the calling program. When arguments are passed by reference, the is passed the addresses of its actual Whenever the subprogram processes one of the 3-2 subprogram arguments. arguments, FORTRAN-IB/2~ AND VAX FORTRAN INCOMPATIBILITIES it uses the address of the argument to process the argument directly. Since the arguments are acted upon directly, local copies of the arguments do not exist. These different mechanisms for passing arguments usually do not concern the FORTRAN programmer, since there are only three situations where call by value-result differs from call by reference. The three situations are the following: • When multiple copies of the same passed to a subprogram • When a variable is passed to a subprogram and the subprogram also references the variable by COMMON • When one entry point of a subprogram with multiple entry points refers to an argument passed to a previous entry point, and that argument was modified between the two calls. All three of these FORTRAN-77 standard. cases are variable prohibited by are the The following program illustrates the different results that can be obtained when a subprogram accesses a variable both as an argument and by COMMON: l~ 2~ 1~00 l~ 2~ 30 1000 COMMON I 1=1 WRITE(5,1000) 10, I CALL SUB(I) WRITE(5,1000) 20, I FORMAT(' Line', 13, , of Main Program, 1=', II) END SUBROUTINE SUB(I) COMMON J WRITE(5,1000) 10, I, J 1=2 WRITE(5,1000) 20, I, J J = 3 WRITE(5,1000) 30, I, J FORMAT(' Line', 13, , of SUB, 1=', II, , and J=', II) END 3-3 FORTRAN-19/29 AND VAX FORTRAN INCOMPATIBILITIES If this program is compiled by FORTRAN-10/20, it prints: Line Line Line Line Line 10 10 20 30 20 of of of of of Main SUB, SUB, SUB, Main Program, 1=1 1=1 and J=l 1=2 and J=l 1=2 and J=3 Program, 1=2 If this program is compiled by VAX FORTRAN, it prints: Line Line Line Line Line 10 10 20 30 20 of of of of of Main SUB, SUB, SUB, Main Program, 1=1 1=1 and J=l 1=2 and J=2 1=3 and J=3 Program, 1=3 The difference in the program output is because the FORTRAN-10/20 program modifies a local copy of its argument, while the VAX FORTRAN program modifies its argument directly. 3.3 LOGICAL TESTS The logical constants .TRUE. and .FALSE. are defined, respectively, as all ones and all zeros by both FORTRAN-10/20 and VAX FORTRAN. However, the test for true and false differs. FORTRAN-10/20 tests the left-most bit (the sign bit) of a LOGICAL value to determine if the value is true or false. VAX FORTRAN tests the right-most bit (the low-order bit) of a LOGICAL value to determine if the value is true or false. In most cases, this difference is not apparent to the FORTRAN programmer. It is only significant in the following cases: • A program EQUIVALENCEs a LOGICAL variable and a numeric variable. 3-4 FORTRAN-l~/2~ AND VAX FORTRAN INCOMPATIBILITIES numeric operations on • A program performs LOGICAL values. • A program assigns octal or numeric constants to a LOGICAL variable, or uses octal or numeric values as LOGICAL values. The following program illustrates this incompatibility: LOGICAL L L = 1 IF (L) THEN WRITE{5,' (lX,A)') 'L is true.' ELSE WR I TE {5 , , (I X, A) ') 'L is fa 1 s e • ' END IF END If this program is compiled by FORTRAN-10/20, it prints: L is false. If this program is compiled by VAX FORTRAN, it prints: L is true. 3.4 THE ASSIGNED GOTO STATEMENT VAX FORTRAN ignores the optional list of labels in an assigned GOTO statement. FORTRAN-10/20 checks at runtime to make sure that the assigned variable matches one of the labels in the list, and proceeds to the next statement if there is no match. 3.5 I/O INCOMPATIBILITIES There are FORTRAN-10/20 capabilities. differences. several incompatibilities between and VAX FORTRAN for input/output The following sections describe these 3-5 FORTRAN-l~/2~ 3.5.1 AND VAX FORTRAN INCOMPATIBILITIES Default Filenames Associated with Units The unit number assignments differ between FORTRAN-l0/20 and VAX FORTRAN. The default unit number assignments are important because programs that do not open their files explicitly using the OPEN statement get a file with a default name on the default device associated with that unit number. FORTRAN-l0/20 associates a different device with each unit number. For example, unit 1 is disk, unit 2 is the card reader, unit 3 is line printer, unit 5 is the terminal, and so on. The filename that FORTRAN-l0/20 associates with each unit is of the form "FORxx.DAT", where xx is the two digit unit number with leading zeros. VAX FORTRAN associates disk with all units except 5 and 6. VAX FORTRAN associates unitS with the terminal for input, and unit 6 with the terminal for output. The default filename that VAX FORTRAN associates with each unit is "FORxxx.DAT", where xxx is the three digit unit number with leading zeros. The default unit device assignments affect how the OPEN statement works as well. When a NAME= (or FILE=) specifier does not specify a device name, the default device associated with the unit is used. 3.5.2 Unit 5 for Both Input and Output On the VAX, unit 5 may be used for both input and output to the terminal for interactive jobs; however, under batch unit 5 must be used for input and unit 6 for output. On the DECSYSTEM-l0/20, unit 5 may always be used for both input and output. 3-6 FORTRAN-l0/20 AND VAX FORTRAN INCOMPATIBILITIES 3.5.3 STATUS='NEW' Numbers File and Generation (Version) If a VAX FORTRAN or FORTRAN-20 program opens a file with STATUS='NEW' and no "version" (VAX/VMS) or "generation" (TOPS-20) number is specified, a new generation of the file will be created. If a FORTRAN-l0 program attempts to open a file with STATUS='NEW' and that file exists, an error message is given. Note that the generation number does not apply to TOPS-l0. 3.5.4 STATUS='UNKNOWN' and Numbers File Generation (Version) If a file is opened for output with STATUS='UNKNOWN' and no "version" (VAX/VMS) number is specified by a VAX FORTRAN program, the highest existing version number is written. If a FORTRAN-20 program attempts to open a file for output with STATUS='UNKNOWN', and does not specify a "generation" (TOPS-20) number, then a new generation of the file is always written. 3.5.5 The CARRIAGECONTROL= Specifier The meanings of CARRIAGECONTROL=' FORTRAN'. and CARRIAGECONTROL='LIST' on a VAX and a DECSYSTEM-l0/20 are similar, but there are differences which the user should be aware of. There is a slight difference between DECSYSTEM-l0/20 and VAX with regard to CARRIAGECONTROL='FORTRAN'. On the VAX, a file whose attribute is CARRIAGECONTROL= 'FORTRAN' will have the first character of each record translated to one or more vertical motion characters when the file is either printed or typed. On the DECSYSTEM-l0/20 , this action occurs only when the file is pr inted. 3-7 FORTRAN-I~/2~ AND VAX FORTRAN INCOMPATIBILITIES In addition, FORTRAN-I 0/20 supports CARRIAGECONTROL= 'TRANSLATED', which forces translation of the first character of each record as it is output to the specified file. There is an interaction of the PRINT command under the TOPS-10 and TOPS-20 operating systems and files with the extension of "DAT" that is of interest to users of FORTRAN. When one of these two operating systems prints a file with the extension of "OAT", it strips off the first character of every line and uses it to control the vertical spacing of the printer using FORTRAN carriage-control rules. 3.5.6 The RECL= Files Specifier and Formatted Sequential The RECL= specifier has a meaning for formatted sequential access files on the VAX that it does not have on the DECSYSTEM~10/20. On the VAX, formatted sequential access files have by default variable-length records (RECORDTYPE='VARIABLE'). For this type of file organization, the RECL= ~pecifier gives the maximum length of any, 'record., If the RECL= specifier is not specified for a new formatted sequential access file, a default of RECL=133 is assumed. If an attempt is made to write a record greater than the RECL value, an error occurs. Thus, if a program writes a 200 character record to a new, formatted sequential access file without giving a RECL= specifier in a OPEN statement, it will get a run-time error on a VAX processor. The program will not have any problems on a DECSYSTEM-10/20 processor. On the DECSYSTEM-10/20, RECL= specifies that the file has fixed-length records. If no RECL= specifier is given, the records are assumed to be variable length, and the maximum record size is 655360 characters. 3-8 FORTRAN-IB/2B AND VAX FORTRAN INCOMPATIBILITIES 3.5.7 ASSOCIATEVARIABLE= Specifier The execution of an OPEN statement with an ASSOCIATEVARIABLE= specifier in FORTRAN-10/20 has the effect of setting the associate variable to 1. The execution of such an OPEN statement in VAX FORTRAN does not affect the value of the associate variable at all. 3.5.8 ACCESS='APPEND' and REWIND VAX FORTRAN allows a program to REWIND a file that has been opened ACCESS='APPEND'. FORTRAN-10/20 allows this feature on TOPS-10, but not on TOPS-20. 3.6 INQUIRE STATEMENT FORTRAN-10/20 and VAX FORTRAN differ on the action taken when an error occurs in an INQUIRE. FORTRAN-10/2B takes an error branch if file the being inquired about is an illegal file specification, or if the logical unit number being inquired about is out of range. VAX FORTRAN reports that the file or unit does not exist. The following INQUIRE statement specifiers are supported by VAX FORTRAN only: 1. RECORDTYPE='SEGMENTED' ,'STREAM_CR' ,'STREAM_LF' The BYTESIZE specifier only. 3.7 is supported by FORTRAN-10/20I THE OPEN STATEMENT This section lists the several categories • • OPEN statement specifiers Section 3.7.1 lists the specifiers the FORTRAN-77 standard. 3-9 allowed in by FORTRAN-IB/2B AND VAX FORTRAN INCOMPATIBILITIES • Section 3.7.2 lists the specifiers supported by both FORTRAN-10/20 and VAX FORTRAN. • Section 3.7.3 lists the only by FORTRAN-10/20. specifiers supported • Section 3.7.4 ~ists the only by VAX FORTRAN. specifiers supported • Section 3.7.5 lists suggestions on converting OPEN statements so that they can be used with either FORTRAN-10/20 or VAX FORTRAN. 3.7.1 Standard OPEN Specifiers The following OPEN statement specifiers are the FORTRAN-77 standard: allowed 1. ACCESS='DIRECT' and ACCESS='SEQUENTIAL' 2. BLANK='ZERO' and BLANK='NULL' 3. ERR= 4. FILE= 5. FORM='FORMATTED' and FORM='UNFORMATTED' 6. IOSTAT= 7. RECL= 8. STATUS='NEW', STATUS='OLD', STATUS='SCRATCH', STATUS='UNKNOWN' 9. UNIT= 3-10 by FORTRAN-10/2~ 3.7.2 AND VAX FORTRAN INCOMPATIBILITIES OPEN Specifiers Common to FORTRAN-10/20 FORTRAN and VAX The following OPEN statement specifiers are supported by both FORTRAN-10/2~ and VAX FORTRAN in addition to the specifiers in Section 3.7.1: 1. ACCESS='APPEND' and ACCESS='KEYED' 2. ASSOCIATEVARIABLE= 3. BLOCKSIZE= 4. BUFFERCOUNT= 5. CARRIAGECONTROL='FORTRAN', CARRIAGECONTROL='LIST', and CARRIAGECONTROL='NONE' 6. DEFAULTFILE= 7. DISPOSE='DELETE', DISPOSE='KEEP', DISPOSE='PRINT', and DISPOSE='SAVE' 8. KEY= 9. MAXREC= 10. NAME= 11. NOSPANBLOCKS 12. ORGANIZATION= 13. READONLY 14. RECORDSIZE= 15. SHARED 16. TYPE='NEW', TYPE='OLD', TYPE='SCRATCH', TYPE='UNKNOWN' 17. RECORDTYPE='FIXED', RECORDTYPE='STREAM', and RECORDTYPE='VARIABLE' 3-11 FORTRAN-l~/2~ 18. 3.7.3 AND VAX FORTRAN INCOMPATIBILITIES USEROPEN= FORTRAN-lg/2~ OPEN Specifiers Only in The following OPEN statement only by FORTRAN-1~/2~: specifiers are 1. ACCESS='SEQIN', ACCESS='SEQOUT', ACCESS='SEQINOUT', ACCESS='RANDOM' and ACCESS='RANDIN' 2. BYTESIZE= 3. CARRIAGECONTROL='DEVICE', CARRIAGECONTROL='TRANSLATED' 4. DENSITY= 5. DEVICE= 6. DIALOG and DIALOG= 7. DIRECTORY= 8. DISPOSE='EXPUNGE', DISPOSE='LIST', DISPOSE='PUNCH' 9. FILESIZE= 1~. INITIALIZE= 11. MODE= 12. ORGANIZATION=' UNKNOWN' 13. PADCHAR= 14. PARITY= 15. PROTECTION= 16. RECORDTYPE='UNKNOWN' 3-12 supported FORTRAN-10/20 AND VAX FORTRAN INCOMPATIBILITIES 17. STATUS='DELETE', STATUS='EXPUNGE', STATUS='KEEP' 18. TAPEFORMAT= 19. TYPE='DELETE', TYPE='EXPUNGE', TYPE='KEEP' 20. VERSION= FORTRAN'-10!/20' che.cKs only the- firrs,t six: 'characters of OPEN specifiers for correct spelling. Therefore, it accepts a six letter abbreviation of any Qf its specifi~rs or ~ny mi5spelling of_its ~eywo_r.dsJfthe first six characters are correct. _ FUture versions of FORTRAN-l0/2~l may not. allow this" so it should not be: reI ied upo,n •. 3.7.4 OPEN Specifiers Only in VAX FORTRAN The following OPEN statement only by VAX FORTRAN: 3.7.5 specifiers are supported 1. DISP= 2. DISPOSE='PRINT/DELETE', DISPOSE='SUBMIT " , and DISPOSE='SUBMIT/OELETE' 3. EXTENDSIZE= 4. INITIALSIZE= 5. RECORDTYPE='SEGMENTEO', RECORDTYPE='STREAM_CR', RECORDTYPE='STREAM LF' Conversion of OPEN Statements Many OPEN statement specifiers that are unique to FORTRAN-10/20 or VAX FORTRAN have synonyms that are acceptable to either compiler. This section gives suggestions on converting OPEN statements so that they can be used with either FORTRAN-10/20 or VAX FORTRAN. 3-13 FORTRAN-l~/2~ AND VAX FORTRAN INCOMPATIBILITIES This section also lists which specifiers unique to the two compilers are synonyms. However, these specifiers cannot be put in a form that is acceptable to both compilers. The VAX FORTRAN only specifier DISP= can be made acceptable to either compiler (provided its value is supported by both compilers) if it is converted to DISPOSE=. Several FORTRAN-l~/20 values of the ACCESS= specifier can be rewritten as g series of other specifiers, which ar~ ~ccept~ble to either comp~ler: ACCESS='SEQIN' can be written as ACCESS='SEQUENTIAL' ,STATUS='OLD' ,READONLY ACCESS='RANDIN' can be written as ACCESS='DIREC,T' ,STATUS='OLO' ,READONLY ACCESS='SEQOUT' can be written as ACCESS='SEQUENTIAL',STATUS='UNKNOWN' ACCESS='SEQINOUT' can be written as ACCESS='SEQUENTIAL' ,STATUS=' UNKNOWN , ACCESS='RANDOM' can be written as ACCESS='OIRECT' ,STATUS='UNKNOWN' NOTE The OPEN specifier STATUS='UNKNOWN' has different effects on the generation or version numbers for FORTRAN-20 and VAX FORTRAN (see Section 3.5.4). The FORTRAN-10/20 specifier OISPOSE='LIST' is a synonym However, to the VAX FORTRAN DISPOSE='PRINT/OELETE'. these specifiers cannot be put in a form that is acceptable to both compil~rs. 3-14 FORTRAN-10/20 AND VAX FORTRAN INCOMPATIBILITIES The FORTRAN-10/20 INITIALIZE= specifier is a synonym for the VAX FORTRAN INITIALSIZE= specifier. FORTRAN-IO/20 will recognize the INITIALSIZE specifier because FORTRAN-IO/20 checks only the first six characters of OPEN specifiers for correct spelling. 3.8 THE CLOSE STATEMENT This section lists the several categories. specifiers in • Section 3.8.1 lists the specifiers· allowed the FORTRAN-77 standard. by • Section 3.8.2 lists the specifiers supported by both FORTRAN-10/20 and VAX FORTRAN. • Section 3.8.3 lists the only by FORTRAN-10/20. specifiers supported • Section 3.8.4 lists the only by VAX FORTRAN. specifiers supported • Section 3.8.5 lists suggestions on converting CLOSE statements so that they can be used with either FORTRAN-10/20 or VAX FORTRAN. 3.8.1 CLOSE statement Standard CLOSE Specifiers The following CLOSE statement specifiers are allowed the FORTRAN-77 standard: 1. ERR= 2. IOSTAT= 3. STATUS='KEEP' and STATUS='DELETE' 4. UNIT= 3-15 by FORTRAN-19/2~ 3.8.2 AND VAX FORTRAN INCOMPATIBILITIES CLOSE Specifiers Common to FORTRAN FORTRAN-19/2~ and VAX The following CLOSE statement specifier is supported by both FORTRAN-10/20 and VAX FORTRAN in addition to the specifiers in Section 3.8.1: 1. 3.8.3 DISPOSE='PRINT' and DISPOSE='SAVE' CLOSE Specifiers Only in The following CLOSE statement only by FORTRAN-10/20: FORTRAN-19/2~ spe~ifiers are 1. DEVICE= 2. DIALOG and DIALOG= 3. DIRECTORY= 4. DISPOSE='EXPUNGE', DISPOSE='LIST', DISPOSE='PUNCH', and DISPOSE='RENAME' 5. FILE= 6. NAME= 7. PROTECTION= 8. STATUS='EXPUNGE' 9. TYPE= supported FORTRAN-10/20 only checks the first six characters of CLOSE specifiers for correct spelling. Therefore, it accepts any six letter abbreviation of any of its specifiers or any misspelling of its keywords if the first six characters are correct. Future versions of FORTRAN-10/20 may not allow this, so it should not be relied upon. 3-16 FORTRAN-l~/2~ 3.8.4 AND VAX FORTRAN INCOMPATIBILITIES CLOSE Specifiers Only in VAX FORTRAN The following CLOSE statement specifiers only by VAX FORTRAN: 3.8.5 are supported 1. DISP= 2. DISPOSE='PRINT/DELETE ' , DISPOSE='SUBMIT ' , and DISPOSE='SUBMIT/DELETE ' 3. STATUS='PRINT ' , STATUS= I PRINT/DELETE I , STATUS='SAVE ' , STATUS='SUBMIT ' , and STATUS= I SUBMIT/DELETE I Conversion of CLOSE Statements As is the case with OPEN statement specifiers, many CLOSE statement specifiers that are unique to FORTRAN-l~/2~ and VAX FORTRAN have synonyms, which are acceptable to either compiler. This section gives suggestions on converting CLOSE specifiers into a form that is acceptable to either FORTRAN~1~/2~ or VAX FORTRAN. This section also lists which specifiers unique to the two compilers are synonyms. However, these specifiers cannot be put in a form that is acceptable to both compilers. The VAX FORTRAN only specifier DISP= can be made acceptable to either compiler (provided its value is supported by both compilers) if it is converted to DISPOSE= •. ' .~. ,.':' The VAX FORTRAN only specifier acceptable to both compilers if DISPOSE='pRINT ' • STATUS='pRINT ' is it is converted to The VAX FORTRAN only specifier acceptable to both compilers if STATUS='KEEP ' • STATUS='SAVE ' is it is converted to 3-17 FORTRAN-19/29 AND VAX FORTRAN INCOMPATIBILITIES The FORTRAN-19/20 specifier DISPOSE=' LIST' is a synonym for the VAX FORTRAN specifier STATUS='PRINT/DELETE'. However, the specifiers cannot be put in a form that is acceptable to both compilers. 3.9 CARRIAGE CONTROL FORTRAN-10/20 and VAX FORTRAN have carriage-control characters in common: ,'+', '0 ' ,1' '$ , the following Overprinting Single Spacing Double Spacing Skip to next top of page Single space, leaving cursor at end of line FORTRAN-10/20 has the following carriage-control characters not supported by VAX FORTRAN: '2 ' ,3' ,_ I *' . I I , , I I' I I Skip to next half of page Skip to next third of page Triple spacing Single space; suppress automatic formfeed Triple space with automatic formfeed after every 20 lines Double space with automatic formfeed after every 30 lines Space to next sixth of page VAX FORTRAN bas the foll-owing carriage~contr-ol character not supported by FORTRAN-l0/20: -null Over-pr in-t, leaving cursor at end of line 3-18 FORTRAN-I~/2~ AND VAX FORTRAN INCOMPATIBILITIES FORMAT EDIT DESCRIPTORS 3.1~ 3.1~.1 Interaction of the X and $ Edit Descriptors Normally, the X formated'it descriptor cannot be used to write blanks at the end of a line. Thus, the following program: l~ WRITE(5,10) FORMAT(' Hello', END l~X) will not write ten blanks after the word "Hello". FORTRAN-l~/2~ has a single exception to this rule. If the line was written with $ (dollar sign) carriage control, or the $ edit descriptor was used to end the line, then the X edit descriptor can be used to write blanks at the end of the line. VAX FORTRAN does not have this exception. Both FORTRAN-10/20 and VAX FORTRAN provide a way to write blanks at the end of a line, regardless of the exc~ption for $ carriage control or the $ edit descriptor. If blanks are to be written at the end of a line, a literal containing blanks should be used. For example, the above format could be rewritten as: 10 3.1~.2 FORMAT(' Hello', 10(' I)) Interaction of the $ Edit Carriage-Control Characters Descrip~or and Both FORTRAN-10/20 and VAX FORTRAN allow the use ot: ,- !the' $ (dollar sign) edit descriptor on output to modify the carriage control specified b~ the firsi chara6ter of the record. For FORTRAN-10/2~, the $ edit descriptor suppresses all carriage control at the end of the current record (for CARRIAGECONTROL='LIST') or at the beginning of the next record (for CARRIAGECONTROL='FORTRAN' or 'TRANSLATED'). 3-19 FORTRAN-10/20 AND VAX FORTRAN INCOMPATIBILITIES For VAX FORTRAN, the $ edit descriptor is ignored if the first charcter of the record is "0" or "1". If the first character is a plus sign (+), the $ descriptor causes the output to begin at the end of the previous line and leaves the print position at the end of the line. 3.10.3 F, E, D, and G Edit Descriptors FORTRAN-10/20 allows an alternate form of the E, and G edit descriptors: F, D, VAX FORTRAN does not support this alternate form of descriptors. the Fw Ew Dw Gw for for for for Fw.0 Ew.0 Dw.0 Gw.0 FORTRAN-10/20 allows the use of the G edit descriptor with character data. VAX FORTRAN does not support this . I use. 3.~0.4 0 and Z Edit Descriptors The forms of the 0 and Z edit descriptors are: O[w[ .m]] Z[wt-.mll Where: w is the length of the field. m is the number of digits output to the field. 3-20 guaranteed to be FORTRAN-10/20 A~D VAX: FORTRAN INCOMPA'.l'.IBILITIES' If m is not specified for the 0 and Z edit descriptors" FORTRAN-10/20 assumes a default value equal to w, while VAX FORTRAN assumes a default value of 1. Thus, FORTRAN-10/20 prints leading zeros for the 0 and Z edit descriptors, and VAX prints leading spaces. FORTRAN-10/20 allows octal and hexadecimal numbers to have an optional sign when input. A plus sign has no effect, and a minus sign causes the negative (two's complement) of the number to be input. VAX FORTRAN does not allow octal and hexadecimal numbers to have a sign. < 3.10.5 Default Field Widths Both FORTRAN-10/20 and VAX FORTRAN allow format edit descriptors to be ,used without spec~fying field width values. If an edit descriptor is used without specifying, a field width, then a default width is supplied based "on the data ,type of the I/O list element (see Table 3-l). Note that for the purposes of assigning the default field widths, the FORTRAN data types fall into four distinct classes: Half-Word Data Types: INTEGER*2 (VAX FORTRAN) Single-Word Data LOGICAL*4, REAL*4 Double-Word; REAL*8 Data LOGICAL*2 Types: Types: Quad-Word Data Type: (VAX COMPLEX*8, COMPLEX*16 (VAX REAL*16 (VAX FORTRAN) The CHARACTER Data type 3-21 FORTRAN) , INTEGER*4, FORTRAN) , FORTRAH-lfJ/2" AND VAX FORTRAN INCOMPATIBILITIES Table 3-1: Default Field Widths for Edit Descriptors Descriptor Data Type 19/29 I I Half"';Word Single-Word S i ngl e-Word. Double-Word 'Quad-Word Single-Word Double-Word Quad-Word Single-Word Double-Word Quad-Word Single-Word Double-Word Quad-Word Character*n Single-Word Double-Word Single-Word Single-Word Do ubI e-Wo rd Single-Word Double-Word Character*n 17 (*) 112 FlS.7 (&) F2S.l6 (&) -- F42.33 (i) . ElS.7E2 ElS.7E2 E2S.l8E2 E2S.16E2 E42.33E3 (.j:) ElS.7E2 ElS.7E2 E2S.l8E2 E2S.16E2 E42.33-£3 (.j: r GlS.7E2 (%) ,. GlS.7E2 G2S.l8E2 G2S.l6E2 G42.33E3 (i) Gn (%) F F " F E E E D D D G G G G o o L Z Z A A A VAX 115 115 FlS.7 F2S.l8 015 025 012 . 023 LIS ZIS L2 Z2S AS A10 An Z12 Z23 A4 A8 An Notes: * FORTRAN-10/20 treats INTEGER*2 and LOGICAL*l variables as if they were INTEGER*4 and LOGICAL*4 variables, respectively. & FORTRAN-10/20 expands the default field width for the F edit descriptor if the default field width is too small for the data. % VAX FORTRAN does not allow INTEGER CHARACTER I/O with the G edit descriptor. i FORTRAN-10/2g does not support REAL*16. 3-22 or FORT~~~18/20 3.11 i\ND VAX. FORTR~N INCOMPATI.BILITI~_S INCLUDE STATEMENT The FORTRAN-10/20 and VAX FORTRAN INCLUDE have the following incompatibilities: 3.12 statements • The VAX FORTRAN INCLUDE statement does not have a /NOCREF switch. • FORTRAN~10/20 lists the text from the INCLUDEd file by default. VAX FORTRAN requires that the /LIST switch be specified to list the included file, or that the /SHOW=INCLUDE qualifier be given. when the program unit is compiled. • FORTRAN-10/20 does not support the inclusion of text from a text library. VAX FORTRAN allows a name in parentheses to follow the name of the file in the INCLUDE statement. The name in parentheses designates a module (section) of a text library file that is to be included., PROGRAM STATEMENT Both FORTRAN-10/20 and VAX FORTRAN prohibit the name of the main program, as given by the PROGRAM statement, from. being the same as the name of any subprogram,· entry point, or COMMON block in the executable program. VAX F0RTRAN, further restricts the program, name . from being the same as the name of.any.variable,.:?ARAMETER, or NAMELIST in the main program. 3.13 FORTRAN-SUPPLIED SUBPROGRAMS. This section describes the differences in the FORTRAN-supplied subprograms between FORTRAN-10/20 and VAX FORTRAN. 3-23 EORTRAN-18/28 AND VAX FORTRAN INCOMPATIBILITIES 3.13.1 Functions That Are Generic Only in FORTRAN-l~/2~ The following functions are gener ic in FORTRAN-10/20, but do not have the generic property in VAX FORTRAN: 1. ALOG synonym function LOG 2. ALOG10 synonym ' for function LOG10 3. -the' At1AXI - . syriohym -for .-:( .. furiction ':'MAX ; < 4. 3.13.2 AMINI synonym function 'MIN for the the the for standard generic standard generic standard '; generic '" .1.;"'; : standard " generic Functions That Are Generic Only in VAX FORTRAN The following functions are generic in VAX FORTRAN, do not have the generic property in FORTRAN-10/20: arc cosine 1. ACOSD degrees 2. ASIND - arc sine with angle measured in degrees 3. ATAN20 - arc tangent measured in degrees of quotient with 4. ATANO - arc degrees with angle measured 5. COSO - cosine of angle in degrees 6. SIND - sine of angle in degrees 7. TANO - tangent of angle in degrees tangent 3-24 with angle but measured in angle in FORTRAN-l~/2~ 3.13.3 AND VAX FORTRAN INCOMPATIBILITIES Generic Functions Only Available in VAX FORTRAN VAX FORTRAN has the following available in FORTRAN-l~/2~: generic routines 1. DCMPLX - conversion to DOUBLE COMPLEX 2. QEXT - conversion to REAL*16 not Note that most of the VAX FORTRAN generic functions can result in calls to intrinsic functions to process INTEGER*2, DOUBLE COMPLEX, or REAL*16 data. The corresponding FORTRAN-l~/2~ generic functions can never do this because FORTRAN-10/20 lacks those data types. 3.13.4 Intrinsic Functions Only Available in FORTRAN-10/20 has the following intrinsic functions available in VAX FORTRAN: not FORTRAN-10/2~ 1. COTAN - REAL cotangent of an angle 2. DCOTAN - DOUBLE PRECISION cotoangent of an angle 3.13.5 Intrinsic FORTRAN Functions VAX FORTRAN has the following available in FORTRAN-10/2~: Only Available intrinsic in VAX functions not 1. ACOSD, DACOSD, QACOSD The REAL*4, REAL*8, REAL*16 arc cosine with angle measured in degrees 2. ASIND, DASIND, QASIND The REAL*4, REAL*8, REAL*16 arc sine with angle measured in degrees 3. ATAN2D, DATAN2D, QATAN2D - The REAL*4, REAL*8, REAL*16 arc tangent of quotient with angle measured in degrees 3-25 FORTRAN-IO/20 AND VAX FORTRAN INCOMPATIBILITIES 4. ATAND, DATAND, QATAND REAL*16 arc tangent degrees 5. DBLEQ - Convert REAL*16 to REAL*B 6. QACOS - REAL*16 arc cosine 7. QASIN - REAL*16 arc sine B. QATAN - REAL*16 arc tangent 9. QATAN2 - REAL*16 arc tangent of a quotient 10. QCOS - REAL*16 cosine 11. QCOSD - REAL*16 cosine with angle degrees 12. QCOSH - REAL*16 hyperbolic cosine 13. QDIM numbers 14. QEXP - REAL*16 exponential function 15. QEXT - Generic conversion to REAL*16 16. QEXTD - Convert REAL*B to REAL*16 17. QLOG - REAL*16 natural logarithm lB. QLOG10 - REAL*16 common logarithm 19. QMAX1 Finds arguments the maximum of its REAL*16 20. QMINI Finds arguments the minimum of its REAL*16 21. QMOD - Remainder of two REAL*16 arguments 22. QSIGN - REAL*16 transfer of sign positive The REAL*4, REAL*B, with angle measured in difference 3-26 of measured two in REAL*16 FORTRAN-l~/2~ AND VAX FORTRAN INCOMPATIBILITIES 23. QSIN - REAL*16 sine 24. QSIND - REAL*16 sine degrees 25. QSINH - REAL*16 hyperbolic sine 26. QSQRT - REAL*16 square root 27. QTAN - REAL*16 tangent 28. QTANH - REAL*16 hyperbolic tangent 29. SNGLQ - Convert REAL*16 to REAL*4 30. TAND, DTAND, QTAND REAL*4, REAL*8, REAL*16 tangent of an angle measured in degrees 31. ZEXT, IZEXT, JZEXT - Zero extend a INTEGER value giving an INTEGER 3.13.6 with angle measured LOGICAL in or INTEGER Function Differences The presence of both the INTEGER*2 and INTEGER*4 data types in VAX FORTRAN has caused VAX FORTRAN to treat the standard names of the intrinsic functions that take INTEGERs as arguments as generic names. These generic names select between the intrinsic functions that take the appropriate type of INTEGER argument. Table 3-2 shows which VAX INTEGER functions are selected by these names. Since FORTRAN-10/20 has only one INTEGER data type, programs that are to be transported between the two machines generally should not refer to INTEGER functions using VAX INTRINSIC names, such as IIABS or JIINT. Instead, the INTEGER functions should be referred to by using the FORTRAN-77 standard name for the INTEGER functions, such as lABS or INT. However, the FORTRAN-10/20 runtime library does define the VAX intrinsic integer function names as synonyms for FORTRAN-10/20 integer function names. Note that these functions are not considered to be intrinsic by the FORTRAN-10/20 compiler. 3-27 FORTRAN-18/2~ Table 3-2: AND VAX FORTRAN INCOMPATIBILITIES VAX-II FORTRAN INTEGER Function Names VAX FORTRAN Generic Name Function of an INTEGER*2 Argument Function of an INTEGER*4 Argument lABS INT IDINT NINT IDNINT FLOAT IFIX DFLOAT IIABS lINT IIDINT ININT IIDNNT FLOATI IIFIX DFLOTI JIABS JIINT JIDINT JNINT JIDNNT FLOATJ JIFIX DFLOTJ MAX~ IMAX~ JMAX~ MAXI IMAXI JMAXI AMAX~ AIMAX~ AJMAX~ MIN0 MINI AMIN0 IDIM MOD ISIGN IMIN0 IMINI AIMIN0 IIDIM IMOD IISIGN JMIN0 JMINI AJMIN0 JIDIM JMOD JISING 3.13.7 DOUBLE-PRECISION COMPLEX Functions FORTRAN-I~/20 does not support the DOUBLE COMPLEX data type. However, it does supply subprograms to calculate many of the same functions as the VAX FORTRAN DOUBLE COMPLEX functions. The FORTRAN-10/2~ subprograms to do these calculations are subroutines that take arguments of two-element DOUBLE PRECISION arrays, which are manipulated as if they were DOUBLE COMPLEX variables. The remainder of this section describes the correspondence between the VAX FORTRAN functions of DOUBLE COMPLEX numbers and the appropriate FORTRAN-10/20 subprograms. 3-28 FORTRAN-lg/2~ AND VAX FORTRAN INCOMPATIBILITIES The following are DOUBLE COMPLEX functions of DOUBLE COMPLEX arguments in VAX FORTRAN, but in FORTRAN-l~/2~ they are subroutines of two DOUBLE PRECISION two-element arrays (the second argument is the result): CDSQRT, CDLOG, CDEXP, CDSIN. The VAX FORTRAN function DCMPLX has no corresponding subprogram in FORTRAN-10/20. However, a similar effect could be obtained by assigning values to the elements of the two-element DOUBLE PRECISION array that is being used as a DOUBLE COMPLEX variable. The VAX FORTRAN functions DREAL and DIMAG have no corresponding subprograms in FORTRAN-10/20. However, their effects could be obtained by referring to the first element (for the real part) or the second element (for the imaginary part) of the DOUBLE PRECISION array being used as a DOUBLE COMPLEX variable. The VAX FORTRAN function DCONJG has no corresponding subprogram in FORTRAN-10/20. However, in FORTRAN-10/20, the complex conjugate can be formed by negating the second element of the DOUBLE PRECISION array being used as the DOUBLE COMPLEX variable. The DOUBLE PRECISION function CDABS is a function in both VAX FORTRAN and FORTRAN-10/20. However, in VAX FORTRAN its argument is a DOUBLE COMPLEX variable, and in FORTRAN-10/20 it is a two-element DOUBLE PRECISION array, which is treated as if it is a DOUBLE COMPLEX variable. Note that the generic function ABS in VAX FORTRAN may result in a call to the function CDABS. This can never happen in FORTRAN-10/20. 3-29 FORTRAN-10/20 AND VAX FOR"TRAN INCOMPATIBILITIES 3.13.8 Similar Subroutines FORTRAN in FORTRAN-10/20 and VAX The following subroutines exist in both FORTRAN-10/20 and VAX FORTRAN. However, they have various differences that are described below: 1. DATE On both compilers, this subroutine returns the date in the form 'dd-mmm-yy'. However, when a numeric variable is used as the argument, VAX FORTRAN returns only those 9 characters, while FORTRAN-10/20. ends the date with a trailing blank, and thus returns 10 characters. 2. ERRSET - Allows the user to control the actions taken when an error occurs. This subroutine has different arguments in FORTRAN-10/20 than in VAX FORTRAN, and VAX FORTRAN ERRSET provides somewhat less capabilities than FORTRAN-l 0/20 ERRSET. The VAX Condition Handling Facility provides a more general method of defining the actions that are to be taken on error than VAX FORTRAN ERRSET, and is recommended over ERRSET. 3. ERRSNS - Determines the error number of the last error that occurred. The FORTRAN-10/20 ERRSNS has a different number of arguments than the VAX FORTRAN ERRSNS, and the error numbers on the two runtime systems are different. 4. EXIT - Terminates execution of the program. In VAX FORTRAN, EXIT optionally accepts one argument. The FORTRAN-10/20 EXIT does not take any arguments. 5. RAN - Returns a random number. This subroutine is similar to the RAN function in both FORTRAN-10/20 and VAX FORTRAN. Note that the FORTRAN-10/20 RAN and the VAX RAN use different algorithms, and thus return different sequences of random numbers. 3-30 FORTRAN-le/2~ AND VAX FORTRAN INCOMPATIBILITIES 6. MVBITS - Transfers a bit field from one storage location (source) to a field in a second storage location (destination). 7. TIME - Returns the time of day as a character string. In VAX FORTRAN, this subroutine takes one argument and returns the time of day in the form "hh:mm:ss". The FORTRAN-10/20 TIME subroutine takes either one or two arguments and returns the time in the form "hh:mm" in the first argument and "ss.t" in the second argument. (Where "hh" is hours, "mm" is minutes, "ss" is seconds, and "t" is tenths of seconds. ) 8. SECNDS - Returns the number of seconds midnight, minus the argument to subroutine. 3.13.9 since this Subroutines Only Available in FORTRAN-10/20 The following FORTRAN-10/20: subroutines are available only in 1. ALCCHR - Allocates space on the character stack for dynamic character operations. 2. CHKDIV - Returns the number ~f the which error messages are written. unit to 3. CLRFMT - Discards a FORMAT statement the execution of the SAVFMT routine. saved by 4. DIVERT - Enables you to redirect error messages from the current device to an open file on a specified device. 5. DTOGA - Converts elements of DOUBLE-PRECISION arrays from D-floating format to G-floating format. (Available as Runtime Library Routine on VAX/VMS.) 3-31 FORTRAN-19/29 AND VAX FORTRAN INCOMPATIBILITIES 6. DUMP - Causes specified portions of be dumped to the line printer. memory 7. FFUNIT - Returns the unit number of available FORTRAN logical unit. the 8. GTODA - Converts elements of DOUBLE-PRECISION arrays from G-floating format to D-floating format. (Available as Runtime Library Routine on VAX/VMS.) 9. ILL - Sets the ILLEG flag. The ILLEG flag, if set, allows illegal characters to appear in floating-point input. If such an illegal character is encountered, no error message is produced and the corresponding value is set to zero. 10. LEGAL - Clears the ILLEG flag, and thus causes illegal characters in floating-point input to produce an error. 11. OVERFL - Returns information about the overflow, underflow, or divide check. 12. PDUMP - Like the DUMP subroutine except that control returns to the calling program after the dump has been executed. 13. QUIETX - Suppresses all summary the program exits. 14. SAVFMT Causes a format specification contained in the specified array or character variable to be encoded into an internal form that allows more efficient processing. (In VAX FORTRAN, the use of Variable Format Expressions (VFEs) provide most of the capability of SAVFMT.) 15. SAVRAN - Saves the last internal generated by the RAN function. 16. SETRAN - Sets the internal seed value RAN function. 3-32 type-out seed for to first last when value the FORTRAN-le/2g AND VAX FORTRAN INCOMPATIBILITIES 17. SORT - Sorts one or more files using the SORT program. (FORTRAN-lg/20 SORT and VAX SORT use different arguments.) 18. SRTINI - Directs FOROTS to start allocating memory from top downward to account for large overlay programs and preallocates pages 600:677 for SORT. 19. TOPMEM - Directs FOROTS to start allocating memory from top downward to account for large overlay programs. 20. TRACE Generates a list subprograms on the terminal. 3.l3.lg of the active Subroutines Only Available in VAX FORTRAN The following subroutines FORTRAN: are only available in VAX 1. ASSIGN - Associates a filename with a logical unit number. ASSIGN provides a subset of the capabilities of the OPEN statement. 2. CLOSE - Closes a file. The CLOSE subroutine provides a subset of the capabilities of the CLOSE statement. 3. ERRTST - Checks if a particular error occurred. 4. I/O options. FDBSET FDBSET Specifies provides a subset of the capabilities of the OPEN statement. 5. IDATE - Returns the date as three integers (the number of the month, day, year). 6. IRAD50 - Converts Hollerith data to and counts the number of characters. 7. R50ASC - Converts Radix-50 data to Hollerith. 3-33 Radix-50 FORTRAN-l"/2°0 AND VAX FORTRAN INCOMPATIBILITIES 8. HADS0 - Converts Hollerith to Radix-50. 9. RANDU - Returns a random number with a distribution. 10. USEREX - Sets the name of a subroutine to call as part of the program termination process. 3-34 uniform CHAPTER 4 SOFTWARE AND HARDWARE LIMITS 4.1 SOFTWARE LIMITS FORTRAN-10/20 and VAX FORTRAN apply different limits on the size and complexity of programs. This section describes different limits imposed by the two compilers and the associated run-time systems. 4.1.1 Number of Continuation Lines Both FORTRAN-10/20 and VAX FORTRAN accept at least 19 continuation lines, but the differences in the two compilers may cause a statement that contains more than 19 continuations to be acceptable to one compiler and not the other. VAX FORTRAN allows the continuation limit to be set from o to 99 lines using the /CONTINUATIONS qualifier (the default value is 19). Although the /CONTINUATIONS qualifier takes a value measured in lines, the number of continuations allowed by VAX FORTRAN is actually based on the number of characters in the statement field of the lines. Thus, VAX FORTRAN allows more continuation lines than the value of /CONTINUATIONS implies if the continuation lines are short. (The /EXTEND SOURCE qualifier increases the length of lines; therefore, it increases the total number of characters to be processed for the /CONTINUATIONS value.) 4-1 SOFTWARE AND HARDWARE LIMITS The continuation line limit of FORTRAN-10/20 (like VAX FORTRAN) also is actually based on characters instead of lines. But unlike VAX FORTRAN, FORTRAN-10/20 does not require that all the lines that make up the statement fit into the character buffer. FORTRAN-10/20 only requires that the type of the statement be able to be determined from the number of characters that fit into the buffer. Thus, if FORTRAN-10/20 can determine from the first 19 lines of a statement that the statement is an assignment, then it places no actual limit on the number of lines that make up the statement. 4.1.2 Other Compiler Limits Table 4-1 lists other limits that FORTRAN-10/20 and VAX FORTRAN place on the complexity of programs. Where "Memory" is entered in the FORTRAN-10/20 - column, it means that FORTRAN-10/20 imposes no real limit on the complexity of the user subprogram being compiled other than that all the compiler's tables and work areas must be able to fit into memory. FORTRAN-l 0/20 has about 100K words available for this purpose. Currently, FORTRAN-20 does produce code that can run in the extended memory sections available under TOPS-20. However, FORTRAN~10 programs plus the run-time system on the DECsystem-10 must fit into 256K words. This is a much more severe restriction on the size of user programs than is made on a VAX. 4-2 SOFTWARE AND HARDWARE LIMITS Table 4-1: Compiler Imposed Limitations Item VAX FORTRAN FORTRAN-l~/2f3 # of DO loops that can be nested 213 79 Length of character constants 2131313 characters Memory Length of character variables 65535 characters Memory Number of array subscripts 7 128 Number of arguments to subprograms 255 127 1--.----- Number of named COMMON blocks -- ! 2513 Memory t--.----- Number of NAMELIST elements 2513 Memory Length of PAUSE messages 255 characters Memory # of INCLUDE statements that can be nested 113 12 - 4.1.3 I/O Limits Table 4-2 lists the limits in the maximum record length imposed by the run-time systems of FORTRAN-1f3/2f3 and VAX FORTRAN. Where "Memory" is entered in the FORTRAN-1f3/2f3 column, it means that FORTRAN-10/2f3 imposes no real limit on the maximum record length. 4-3 SOFTWARE AND HARDWARE LIMITS Table 4-2: Maximum Record Lengths VAX Formatted ( Bytes) Unformatted (Longwords) Formatted (Bytes) Unformatted (Words) Sequential 32766 8191 655360 Memory Sequential, Variable records of ASCII tape 9999 2499 9999 8192 Indexed 16380 4095 17985 3579 Relative 16380 4g95 262143 52428 4.2 UJ/20 HARDWARE LIMITS This section describes how the FORTRAN data types are represented by the hardware of the DECSYSTEM-10/20 and VAX processors, and the implications that this has for the FORTRAN programmer. 4.2.1 The INTEGER Data Type Both the DECSYSTEM-10/20 and the VAX processors store integers using two's complement representation with the left-most bit being the sign bit. VAX FORTRAN has two integer data types: INTEGER*2 and INTEGER*4. INTEGER variables that do not have a specified length are treated as INTEGER*4 variables by default. The programmer can cause these variables to be treated as INTEGER*2 by specifying the /NOI4 qualifier. FORTRAN-10/20 has only one integer data type: INTEGER*4. If an attempt is made to declare a variable as INTEGER*2, a warning is issued and INTEGER*4 is .used. 4-4 SOFTWARE AND HARDWARE LIMITS Table 4-3 compares the different INTEGER data types. Table 4-3: Integer Number Format Data Type Bits Range 10/20 INTEGER*4 36 -34359738368 to 34359738367 VAX INTEGER*2 16 -32768 to 32767 INTEGER*4 32 -2147483648 to 2147483647 ~X 4.2.2 The LOGICAL Data Type FORTRAN-10/20 has only one LOGICAL data type: LOGICAL*4. It is stored as a word with the high-order bit (the sign bit) determining whether the word is true or false. If an attempt is made to declare LOGICAL*1 variables, FORTRAN-10/20 issues a warning and uses LOGICAL*4. If an attempt is made to declare LOGICAL*2 variables, an error is given. VAX FORTRAN has three LOGICAL data types: LOGICAL*1, LOGICAL*2, and LOGICAL*4. They are implemented as a single byte, two bytes, or a long word, respectively. VAX FORTRAN tests the low-order bit to determine whether a LOGICAL variable is true or false. Note that FORTRAN-10/20 and VAX FORTRAN test different bits to determine whether the value contained in a logical variable is 'true or false. (Section 3.4 explains the impact that this can have on programs.) Table 4-4 summarizes the LOGICAL data types. 4-5 SOFTWARE AND HARDWARE LIMITS Table 4-4: Logical Data Types Data Type Bits Range (if used to store an INTEGER) 10/20 LOGICAL 36 34359738368 to 34359738367 VAX LOGICAL*l 8 -128 to 127 VAX LOGICAL*2 16 -32768 to 32767 VAX LOGICAL*4 32 -2147483648 to 2147483647 4.2.3 The CHARACTER and Hollerith Data Types Both FORTRAN-10/20 and VAX FORTRAN represent CHARACTER and Hollerith data as ASCII characters packed into contiguous locations. However, two important differences make the maximum number of characters that can be packed into the FORTRAN data types different on the two machines: • Characters on a DECSYSTEM-10/20 are represented by 7 bits, and characters on a VAX are represented by 8 bits. • The number of bits used to store the FORTRAN data types on a DECSYSTEM-10/20 differs from the number of bits used to store the FORTRAN data types on a VAX. These differences do not affect the FORTRAN programmer who uses the CHARACTER data type, because all the operations on CHARACTER data are carried out transportably by the compiler and run-time system. However, these differences greatly affect programs that use Hollerith data. Single-word variables and constants can hold up to five characters on a DECSYSTEM-10/20, but only four characters on a VAX. 4-6 SOFTWARE AND HARDWARE LIMITS Table 4-5 lists the maximum number of characters can be packed into the various FORTRAN data types. Table 4-5: Data Type that Characters per FORTRAN Data Type Number of Characters on a VAX Number of Characters on a DECSYSTEM-l~/2e BYTE 1 Not Available COMPLEX 8 l~ COMPLEX*16 16 Not Available INTEGER*2 2 Not Available INTEGER*4 4 5 LOGICAL*l 1 Not Available LOGICAL*2 2 Not Available LOGICAL*4 4 5 REAL*4 4 5 REAL*8 8 l~ REAL*16 16 Not Available Another incompatibility is that VAX programs can manipulate individual characters in Hollerith data by storing the Hollerith string in a LOGICAL*l or BYTE array. Since FORTRAN-l~/2~ does not support these data types, this cannot be done on a DECSYSTEM-l~/2~ processor. The best way to avoid the system dependent aspects of Hollerith data is not to use it; the CHARACTER data type is superior and is transportable. 4-7 SOFTWARE AND HARDWARE LIMITS 4.2.4 The Floating-Point Data Types Both the DECSYSTEM-10/20 and VAX processors have several floating-point formats that allow the programmer a great deal of flexibility in solving numerical problems. These formats are the following: • F-floating format minimizes storage space and execution time at the expense of both range and precision. • D-floating format requires twice as much space and has the same range as F-floating, but provides more than twice the precision. • G-floating format requires the same space as D-floating, but trades a little precision for greatly increased range. • H-floating format (only available on the VAX) requires much more storage space and execution time, but greatly increases the precIslon and range of numbers that can be represented. The corresponding number formats on the two machines have many similarities including: different • Floating-point numbers are represented as a signed fraction multiplied by two raised to the power of some exponent. • The exponent field is stored in excess 1024 notation for G-floating, and in excess 128 notation for F-floating and D-floating. • The fraction is normalized, and its binary po int is to the left of the most significant bit. However, there are several important differences that must be taken into consideration when moving an application from one processor to the other. 4-8 SOFTWARE AND HARDWARE LIMITS Unlike the DECSYSTEM-10/20 , which stores the most significant bit of the mantissa, the VAX floating-point number formats use hidden bit normalization. Hidden bit normalization means that the high-order bit of the mantissa, which is always one because numbers are normalized, is not stored. This has two effects: First, since there is no way to have a zero mantissa (since there is always that hidden bit, which is one), the zero exponent field is reserved to mean that the number represented is zero. Thus, VAX floating-point numbers do not have as great a range as floating-point numbers of the corresponding DECSYSTEM-10/20 floating-point number format. Second, since the most significant mantissa bit is not stored, VAX makes more effective use of its mantissa bits. This causes VAX floating-point number formats to be slightly more precise than the word size of the VAX would imply. The two machine architectures use different representations for negative floating-point numbers. The VAX processor simply has a sign bitj if the bit is zero, then the number is positive. If the bit is one, then the number is negative. The sign bit for VAX floating-point numbers is not in the same bit position in a long word as the sign bit for VAX integer numbers. Thus, if an INTEGER and a REAL variable are equivalenced, the same bit pattern could test negative as the REAL variable and positive as the INTEGER variable. The DECSYSTEM-10/20 processor represents negative floating-point numbers as the two's complement of the positive floating-point numbers. This representation of negative numbers means that a DOUBLE-PRECISION variable cannot be equivalenced to a REAL variable in order to truncate the double-precision number to single precisionj that operation can result in unnormalized numbers. The F-floating number format is used to store the REAL*4 and COMPLEX*8 data types. Table 4-6 compares the F-floating number format on the DECSYSTEM-10/20 and VAX processors. 4-9 SOFTWARE AND HARDWARE LIMITS The D-floating number format is used to store the REAL*8 and COMPLEX*16 (VAX FORTRAN only) data types. Table 4-6 compares the D-floating number format on the DECSYSTEM-10/20 and VAX processors. The G-floating number format is used to store the REAL*8 and COMPLEX*l6 (VAX FORTRAN only) data types if the /GFLOATING switch is given to FORTRAN-10/20, or the /G FLOATING qualifier is given to VAX FORTRAN. Not all DECSYSTEM-10/20 or VAX processors support G-floating. On VAX processors without G-floating, the runtime library may be used to provide software emulation of G-floating. Table 4-6 compares the G-floating number formats on the two machines. The H-floating number format is available only on the VAX. The REAL*l6 data type in VAX FORTRAN uses the H-floating format. Table 4-6 compares H-floating to the other floating-point number formats. Not all VAX processors support H-floating. On VAX processors without H-floating, the runtime library may be used to provide software emulation of H-floating. 4-10 SOFTWARE AND HARDWARE LIMITS Table 4-6: Floating-Point Number Formats Bits of Exponent Bits of Mantissa Range Digits of Precision F·FLOATING NUMBER FORMAT 10/20 8 27 1. 47 x 10**·39 8.1 to 1.70 x 10**+38 VAX 8 24 2.94 x 10**·39 to 1.70 x 10**+38 7.2 D·FLOATING NUMBER FORMAT 10/20 8 62 1. 47 x 10**·39 18.7 to 1.70 x 10**+38 VAX 8 56 2.94 x 10**·39 to 1.70 x 10**+38 16.9 G·FLOATING NUMBER FORMAT 10/20 11 59 27.78 x 10**-309 to 8.99 x 10**+307 17.8 VAX 11 53 5.56 x 10**-309 to 8.99 x 10**+307 16.0 H·FLOATING NUMBER FORMAT VAX 15 113 8.4 x 10**-4933 to 5.9 x 10**+4931 34.0 NOTE There is a symmetric (mirror-image) negative range, as well as a unique representation for zero. 4-11 INDEX -AACCEPT statement, 2-17 Access to storage element addresses, 2-15 ACCESS='APPEND' and REWIND, 3-9 Alternate return labels, 2-15Argument passing user-controlled,:2-16 Arguments passed by reference, 3-2 passed by value-result, 3-2 Arithmetic operators consecutive, "2-12 Array elements numer ic to store formats, 2-22 Arrays numeric to store formats, 2-22 Assigned GOTO statement, 3-5 ASSOCIATEVARIABLE= specifier, 3-9 -BBYTE data type, 2-4 -C- CARRIAGECONTROL specifier, 3-7 CHARACTER assignment statements overlap on, 2-15' CHARACTER data type, 4~6 CHARACTER expressions, 2-14 CHARACTER.variables numeric initialization, 2-10 Characters per data type, 4-7 CLOSE statement, 3-15 CLOSE statement specifiers, 3-15 to 3-17 CLOSE statements conversion of, 3-17 Comment lines, 2-1 on statements, 2-1 Compile-time.constant expressions extended, 2-13 Compiler imposed limitations, 4-3 COMPLEX16 data type, 2-4 Concatenation of length * operands, 2-12 Constants hexadecimal, 2-4 hollerith, 2-5 octal, 2-6 RADIX-50, 2-7 Continuation lines, 4-1 Carriage-control characters, 3-18 Index-1 DOUBLE-PRECISION COMPLEX functions, 3-28 -DD format edit descriptor, 3-2" D-f10ating number format, 2-3, 4-1" DATA statements implied DO in, 2-9 Data types, 3-21 BYTE, .2-4 CHARACTER, 4-6 COMPLEX16, 2-4 floating-point, 4-8 Hollerith, 4-6 INTEGER, 4-4 INTEGER2, 2-5 LOGICAL, 4-5 LOGICAL*l, 2-5 LOGICAL*2, 2-5 number of characters, 4-7 REAL*16, 2-7 RECORD, 2-7 DEBUG lines, 2-2 DECODE statement, 2-17 Default filenames for units, 3-6 DEFINE FILE statement, 2-18 DELETE statement, 2-18 DICTIONARY statement, 2-8 DO loops extended range, 2-16 one trip, 2-16 DO WHILE statement, 2-16 $ dollar sign format edit descriptor, 2-21, 3-19 DOUBLE COMPLEX statement, 2-4 DOUBLE PRECISION number fo rmats, 2-3 -EE format edit descriptor, 3-2" ENCODE statement, 2-18 END DO statement, 2-16 END STRUCTURE Statement, 2-11 EQUIVALENCE of multidimensional arrays, 2-9 Expressions CHARACTER, 2-14 compile-time constant, 2-13 LOGICAL in numeric contexts, 2-14 numeric in LOGICAL contexts, 2-14 EXTEND SOURCE qualifier, 3-1 EXTERNAL statement, 2-8 -FF format edit descriptor, 3-2" F-f10ating number format, 4-9 File generation numbers, 3-7 File version numbers, 3-7 FIND statement, 2-19 Floating-point data types, 4-8 Floating-point number formats D-floating, 4-10 F-floating, 4-9 G-f10ating, 4-10 Index-2 Floating-point number formats (Cont.) H-floating., 4-10-·· Format edit descriptors D, 3-20 default field widths, 2-21, 3-21 $ dollar sign, 2-21, 3-19 E, 3-20 F, 3-20 G, 2-22, 3-20 0, 2-22, 3-20 Q, 2-22 R, 2-23 X, 3-19 Z, 2-23, 3-20 Format expressions variable, 2-23 Formats optional commas in, 2-22 Fo rmatted input comma in, 2-21 Formatted sequential files, 3-8 Formfeed, 3-2 FORTRAN-77 standard, 1-1 extensions, 2..;..1 FORTRAN-supplied subprograms, 3-23 to 3-34 FUNCTION statement length specifiers in, 2-9 Functions double-precision COMPLEX, 3-28 generic, 3-24 INTEGER, 3-27 intrinsic, 3-25 -GG format edit descriptor, 2-22, 3-20 G-floating number format, 2-3, 4-10 Generic functions, 3-24 GOTO statement assigned, 3-5 -HH-floating number format, 4-10 Hardware limits, 4-4 Hexadecimal constants, 2-4 MIL standard, 2-5 Hollerith constants, 2-5 Hollerith data type, 4-6 -II/O in I/O, 2-19 incompatibilites, 3-5 indexed, 2-19 limits, 4-3 Identifiers long, 2-2 special characters in, 2-2 IMPLICIT NONE statement, 2-9 INCLUDE statement, 2-3, 3-23 Input unit 5 for, 3-6 INQUIRE statement, 3-9 INTEGER data type, 4-4 INTEGER functions, 3-27 INTEGER2 data type, 2-5 Index-3 Internal file I/O 1 ist-di rected ,2-1-g Intrinsic functions, 3-25 -LLabels alternate return, 2-15 Length specifiers in FUNCTION statements, 2-9 numeric data type, 2-10 Lines comment, 2-1 continuation, 4-1 DEBUG, 2-2 multi-statement, 2-2 List-directed internal file I/O, 2-19 LOGICAL data type, 4-5 LOGICAL expressions in numeric contexts, 2-14 LOGICAL IF statement two-branch, 2-17 Logical operator .NEQV., 2-15 .XOR., 2-15 Logical tests, 3-4 LOGICAL*l data type, 2-5 LOGICAL*2 data type, 2-5 -NNAMELIST input prompting during, 2-20 NAMELIST statement, 2-19 .NEQV. logical operator, 2-15 Nonprintab1e characters, 3-2 Numeric expressions in LOGICAL contexts, 2-14 where INTEGER required, 2-13 -0- o format edit descriptor, 2-22, 3-20 Octal constants MIL standard, 2-5 of type INTEGER, 2-6 type1ess, 2-6 OPEN statement, 3-9 OPEN statement specifiers, 3-10 to 3-13 OPEN statements conversion of, 3-13 OPTIONS statement, 2-3 Output unit 5 for, 3-6 -p- -MMIL standard hexadecimal constants, 2-5 MIL standard octal constants, 2-5 Multi-statement lines, 2-2 Multidimensional arrays easy EQUIVALENCE of, 2-9 PARAMETER statement alternate form, 2-8 PROGRAM statement, 3-23 PUNCH statement, 2-20 -QQ format edit descriptor, 2-22 Index-4 -RR format edit descriptor, 2-23 RADIX-50 constants in DATA statements, 2-7 REAL*16 data type, 2-7 RECL= specifier, 3-8 RECORD data type, 2-7 Record specifier apostrophe form, 2-17 RECORD statement, 2-10 Relational operators alternate syntax for, 2-12 Remark field, 3-1 REREAD statement, 2-20 REWRITE statement, 2-20 -SSoftware limits, 4-1 Specifiers ASSOCIATEVARIABLE=, 3-9 CARRIAGECONTROL, 3-7 CLOSE statement, 3-15 to 3-17 OPEN statement, 3-10 to 3-13 RECL=, 3-8 Statement field, 3-1 Statements ACCEPT, 2-17 assigned GOTO, 3-5 CHARACTER assignment, 2-15 CLOSE, 3-15 DATA, 2-9 DECODE, 2-17 DEFINE FILE, 2-18 DELETE, 2-18 DICTIONARY, 2-8 DO WHILE, 2-16 Statements (Cont.) DOUBLE COMPLEX, 2-4 ENCODE, 2-18 END DO, 2-16 END STRUCTURE, 2-11 EXTERNAL, 2-8 FIND, 2-19 IMPLICIT NONE, 2-9 INCLUDE, 2-3, 3-23 INQUIRE, 3-9 NAMELIST, 2-19 OPEN, 3-9 OPTIONS, 2-3 PARAMETER, 2-8 PROGRAM, 3-23 PUNCH, 2-20 RECORD, 2-10 REREAD, 2-20 REWRITE, 2-20 STRUCTURE, 2-11 two-branch LOGICAL IF, 2-17 TYPE, 2-20 type declaration, 2-11 UNLOCK, 2-20 VIRTUAL, 2-11 VOLATILE, 2-11 WRITE, 2-18 STRUCTURE statement, 2-11 Subprograms FORTRAN-supplied, 3-23 to 3-34 Subroutines, 3-30 to 3-34 Symbolic constant used as COMPLEX constant, 2-7 -TType declaration statements value initialization, 2-11 Index-5 TYPE statement, 2-20 -u- -WWRITE statement default unit in, 2-18 UNLOCK statement, 2-20 -VVariable format expressions, 2-23 vertical tab, 3-2 VIRTUAL statement, 2-11 VOLATILE statement, 2-11 -XX format edit descriptor, 3-19 .XOR. logical operator, 2-15 -zZ format edit descriptor, 2-23, 3-20 Index-6 FORTRAN-1 0/20 and VAX FORTRAN Compatibility Manual AA-Y868C-TK READER'S COMMENTS NOTE: This form is for document comments only. DIGITAL will use comments submitted on this form at the company's discretion. If you require a written reply and are eligible to receive one under Software Performance Report (SPR) service, submit your comments on an SPR form. Did you find this manual understandable, usable, and well-organized? Please make suggestions for improvement. Did you find errors in this manual? If so, specify the error and the page number. Please indicate the type of reader that you most nearly represent. D Assembly language programmer D Higher-level language programmer o Occasional programmer (experienced) D User with little programming experience D Student programmer D Other (please specify) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ Name _____________ Date _____________________ Organization _ _ _ _ _ _ __ Telephone _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ Street ___________________________________ City _ _ _ _ _ _ _ _ State _ _ Zip Code _ _ _ _ _ _ _ _ _ _ _ _ _ __ or Country I I I I I I ---0 mN.oto "'Om':HDe~ Ta~-- I I 00 Tear t" and m -- - -- - - -- -- - - -- - - - --r~ -111------ --~~;,;;---' .. if Mailed in the United States BUSINESS REPLY MAIL FIRST CLASS PERMIT NO. 33 MAYNARD MASS. POSTAGE WILL BE PAID BY ADDRESSEE SOFTWARE PUBLICATIONS 200 FOREST STREET MR01-2/L 12 MARLBOROUGH, MA 01752 Do Not Tear - Fold Here and Tape - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - II I: :::3 ; 0 1 \ , Q tall I: 0 ;( :; U
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies