HP 3000 Manuals

Comparison of HP FORTRAN 77 and FORTRAN 7X [ HP FORTRAN 77/iX Reference ] MPE/iX 5.0 Documentation


HP FORTRAN 77/iX Reference

Comparison of HP FORTRAN 77 and FORTRAN 7X 


NOTE The FORTRAN 77 Reference Manual cited in this section is the reference manual for FORTRAN 7X (FORTRAN 77 for the HP 1000 computer system), not the manual you are reading now.
One of the major differences between FORTRAN 7X and HP FORTRAN 77 is that the former can be run in an ANSI 66 mode. This capability is not part of HP FORTRAN 77. Conflicts are sometimes generated regarding program execution in the two modes of FORTRAN 7X, ANSI 66 and ANSI 77. HP FORTRAN 77 can resolve one of these ANSI 66-ANSI 77 conflicts. In FORTRAN 7X's ANSI 77 mode, DO loops can be skipped, depending on the values of the control variables; in ANSI 66 mode, all DO loops execute at least once. In HP FORTRAN 77, the ONETRIP directive can be used to specify whether to skip or execute. Other conflicts that can be resolved in FORTRAN 7X (by specifying mode) but not in HP FORTRAN 77 are: * Computed GOTO value out-of-bounds condition. * Intrinsics declared in EXTERNAL and type statements (use the INTRINSIC statement instead in HP FORTRAN 77). Refer to the FORTRAN 77 Reference Manual (for the HP 1000 computer system) for a description of each of the above conflicts. The following are additional differences between FORTRAN 7X and HP FORTRAN 77: * The EMA statement is not part of HP FORTRAN 77. * In FORTRAN 7X a multidimensional array can be referenced by a single dimension in the EQUIVALENCE statement. (See "EQUIVALENCE Statement" in the FORTRAN 77 Reference Manual.) This extension is not part of HP FORTRAN 77. * In FORTRAN 7X, the BLOCK DATA, FUNCTION, PROGRAM, and SUBROUTINE statements allow comments to be specified. This is not part of HP FORTRAN 77 (since it has no NAM record). * In HP FORTRAN 77, instead of specifying the program type and priority in the PROGRAM statement, you can specify formal parameters and pass values from the run string. * HP FORTRAN 77 has no LIST or NOLIST option for the INCLUDE statement or directive as in FORTRAN 7X. (Refer to the FORTRAN 77 Reference Manual.) * The CALL EXIT extension is not part of HP FORTRAN 77. * The FILES directive reserves room for the DCB in FORTRAN 7X. This is not necessary in HP FORTRAN 77. The directive is flagged with a warning message and ignored. * The ALIAS directive in HP FORTRAN 77 does not have the DIRECT, NOABORT, and NOEMA options, but does have the parameter passing information option. * In FORTRAN 7X, true is equal to any negative value and false to any nonnegative value. In HP FORTRAN 77/iX, the low-order bit of the high-order byte determines the logical value. See Chapter 10 for details. * The FORTRAN intrinsics (see Appendix B ) are the same in HP FORTRAN 77, except for the following: PCOUNT ISSW EXEC REIO * The FTN control statement is not part of HP FORTRAN 77. * Compiler invocations differ, as do compiler options and directives. * The carriage control character for no advance in HP FORTRAN 77 is "+", as specified in the ANSI 77 standard. FORTRAN 7X uses the nonstandard "*" instead. * In FORTRAN 7X, if the FORMAT statement specifies a record size greater than 67 words, LGBUF must be called. This restriction does not apply to HP FORTRAN 77, where nothing special is required. * In FORTRAN 7X, the sizes of the w, d, and n fields in format specifications are checked at compile-time for a value greater than 2047. In HP FORTRAN 77 these fields are checked at compile time if they appear in FORMAT statements. Numeric format descriptors must not specify a field width greater than 140. Character field widths are not restricted. * HP FORTRAN 77 allows an unlimited number of array dimensions, whereas FORTRAN 7X (and the ANSI 77 standard) allows only seven. * The six-byte REAL data type is implemented in FORTRAN 7X, but not in HP FORTRAN 77. * In FORTRAN 7X, as an extension to the ANSI 77 standard, unlimited continuation lines are permitted. In HP FORTRAN 77, only 99 are permitted. * FORTRAN 7X include compatibility features that are not a part of the ANSI 77 standard. Compatibility features included in FORTRAN 7X but not HP FORTRAN 77 are as follows: * Extended precision type. * Improper array dimensioning in EQUIVALENCE statement. * Record number connected to unit number (earlier-style direct-access I/O). * Statement function in EXTERNAL statements as arguments. * Parentheses around simple I/O lists. * $ as statement separator. * Storage of Hollerith constants. * Unformatted I/O and paper tape length words. Refer to the FORTRAN 77 Reference Manual for a detailed description of each of the above features. * The ASSIGN and the assigned GOTO statements require a 32-bit integer variable in HP FORTRAN 77. This is not a restriction in FORTRAN 7X. * FORTRAN 7X allows repeat count for both format and edit descriptors in format statements. HP FORTRAN 77 allows only format descriptors to have repeat counts. * In FORTRAN 7X, as an extension to the ANSI 77 standard, a DO variable can be modified. * In FORTRAN 7X, array names may be used alone to specify the first element of the array. This is nonstandard and not allowed in HP FORTRAN 77.


MPE/iX 5.0 Documentation