1.2. Fortran 90 Compatibility

The Fortran 90 language standard introduced new data types, new operators, and new meanings for the existing operators and assignment. It provided ways for programmers to extend Fortran. These facilities allow programmers to create abstract data types by defining new types and the operations to be performed on them. Modules were introduced into Fortran as a convenient way to package these new data types and their operations. Modules can be used by the same programmer in different applications or can be distributed to several users on the same or different projects.

The Fortran 90 standard (ISO/IEC 1539:1991) described the syntax and semantics of the Fortran programming language. The standard addressed certain aspects of the Fortran processing system, but it did not address others. When specifications were not covered by the standard, the interpretation was processor dependent; that is, the processor defined the interpretation, but the interpretation for any two processors did not need to be the same. Typically, programs that rely on processor-dependent interpretations are not portable.

The Fortran 90 standard declared several features to be obsolescent. In the Fortran 95 standard, some of Fortran 90's obsolescent features are deleted. The Cray Fortran Compiler has not deleted any features. The compiler issues an ANSI message whenever a deleted feature is used, however. For more information on deleted and obsolescent features, see the Fortran Language Reference Manual, Volume 3.

1.2.1. Fortran 95 Language Standard

Fortran 95 continues the evolutionary model introduced in Fortran 90 by deleting several of the features marked as obsolescent in Fortran 90 and identifying a few new obsolescent features. For information on these features, see the Fortran Language Reference Manual, Volume 3.

Fortran 95 is a relatively minor evolution of standard Fortran, with the emphasis in this revision being upon correcting defects in the Fortran 90 standard. This new standard also provides interpretation for a number of questions that have arisen concerning Fortran 90 semantics and syntax. For example, the Fortran 95 SIGN(3i) intrinsic function behaves differently from the Fortran 90 SIGN(3i) function if the second argument is negative real zero.

In addition to corrections and clarifications, Fortran 95 contains several extensions to Fortran 90. The major extensions are as follows:

The Fortran 95 standard specifies the following information:

The standard does not specify the following information:

1.2.2. Program Conformance

A program conforms to the standard if all the statements are syntactically correct, execution of the program causes no violations of the standard (such as dividing by zero), and all the input data is in the correct form.

The compiler extensions to the Fortran standard appear in notes throughout the text.

1.2.3. Processor Conformance

In the Fortran standard, the term processor means the combination of a Fortran compiler and the computing system that executes the code. A processor conforms to the standard if it compiles and executes programs that conform to the standard, provided that the Fortran program is not too large or complex for the computer system in question.

Options on the Cray Fortran command line can direct the compiler to flag nonstandard usage. For more information on the command line, see the Cray Fortran Compiler Commands and Directives Reference Manual or the ftn(1) man page. When the option is in effect, the compiler prints messages for extensions to the standard that are used in the program. As required by the standard, the compiler also flags the following items and provides the reason that the item is being flagged:

The Cray Fortran Compiler includes extensions to the Fortran standard. Because the compiler processes programs according to the standard, it is considered to be a standard-conforming processor. When the option to note deviations from the Fortran standard is in effect, extensions to the standard are flagged with ANSI messages when detected at compile time.

1.2.4. Portability

One of the main purposes of a standard is to describe how to write portable programs. However, some things are standard-conforming but not portable; for example, a program that computes a very large number like 10250. Certain computing systems will not accommodate a number this large. Such a number could be part of a standard-conforming program, but it might not run on all systems; therefore, it might not be portable. Another example is a program that uses a deeper nesting of control constructs than is allowed by a particular compiler.