The Queen's University of Belfast

Parallel Computer Centre
[Next] [Previous] [Top]
Redundant
Features
Redundant features
Topics
- Obsolescent features
- Other redundant features
- Redundant features are divided into 5 groups:
Redundant features
Source form
Use new free source form instead
Use modules instead
Redundant features
Data
- DOUBLE PRECISION data type
Superseded by the concept of parameterised data types for numerical potability
- Implicit typing and IMPLICIT statement
Use IMPLICIT NONE statement always
- Old form of type declaration statements e.g.: REAL list of real variables
Use the new form with a double colon (::) between the type and the list of variables
- PARAMETER, DIMENSION and other attribute statements
Use of the attribute forms, rather than the statement forms
Not needed as variables may be initialised in a type statement except for octal, hexadecimal and array section initialisations
- Assumed-size arrays as dummy arrays
Superseded by the assumed-shape arrays
- COMMON blocks and BLOCK DATA
Use of modules obviates the need for them
The introduction of modules, dynamic storage allocation, pointers, and the intrinsic function TRANSFER makes its use unnecessary
Should never be used
Redundant features
Control
- Obsolescent features
- Arithmetic IF statement
- Shared DO termination, and DO termination on a statement other than on a CONTINUE or an END DO statement
- REAL and DOUBLE precision DO variables and control expressions
- ASSIGN and assigned GO TO statements
- Branching to END IF from outside IF block
Can be replaced by IF statement, IF, DO and CASE control constructs, and EXIT and CYCLE statements
- Alternate RETURN
- PAUSE statement
The above listed should never be used in new or revised programs.
The use of labels are rarely necessary with the introduction of modern control constructs and the character string format specifications
- CONTINUE statement to end DO loop
Can be replaced by using DO construct, EXIT and CYCLE statements
- GO TO and computed GO TO statements
IF, DO and CASE constructs, EXIT and CYCLE statements should be used instead
- DO WHILE logical-expression statement
Can replaced by DO loop construct and EXIT statement
Redundant features
Procedures
- Intrinsic functions with specific names for different data types
Superseded by generic versions (note: a specific name is required only when an intrinsic function is being used as an actual argument)
Can be replaced by internal procedures and modules
Superseded by the concept of internal procedures
- External procedures and EXTERNAL statement
Putting procedures either in a module or another program unit as internal procedures makes things much easier that it really is not necessary to use external procedures in any new or revised programs
Redundant features
Input/Output
- Obsolescent features
- Assigned FORMAT specifiers, should be replaced by the character string format specifications
- H edit descriptor, should be replaced by the character constant edit descriptor A
- FORMAT statement
The same effect can be achieved by assigning the format specification to a character string
- ERR=, END=, and EOR= specifiers
Each of these conditions are recommended to be checked by using the IOSTAT= specifier
Is an extremely poorly designed feature and best not to use it unless absolutely necessary
Superseded by the E edit descriptor
- BN and BZ edit descriptors
The BLANK specifier provides a better way to deal with the problem
Can lead to confusion and is best to avoid
Using I, E, EN, ES, F, L, or A edit descriptors can provide some checking whether the data types are all corrected
This position edit descriptor is the same as Turn
[Next] [Previous] [Top]
All documents are the responsibility of, and copyright, © their authors and do not represent the views of The Parallel Computer Centre, nor of The Queen's University of Belfast.
Maintained by Alan Rea, email A.Rea@qub.ac.uk
Generated with CERN WebMaker