All specification statements are nonexecutable.
The form of a DIMENSION statement is:
DIMENSION a(d) [,a(d)]...where each a(d) is an array declarator ( 5.1).
Each symbolic name a appearing in a DIMENSION statement declares a to be an array in that program unit. Note that array declarators may also appear in COMMON statements and type-statements. Only one appearance of a symbolic name as an array name in an array declarator in a program unit is permitted.
If the equivalenced entities are of different data types, the EQUIVALENCE statement does not cause type conversion or imply mathematical equivalence. If a variable and an array are equivalenced, the variable does not have array properties and the array does not have the properties of a variable.
EQUIVALENCE (nlist) [,(nlist)]...where each nlist is a list ( 2.10) of variable names, array element names, array names, and character substring names. Each list must contain at least two names. Names of dummy arguments of an external procedure in a subprogram must not appear in the list. If a variable name is also a function name ( 15.5.1), that name must not appear in the list.
Each subscript expression or substring expression in a list nlist must be an integer constant expression.
An EQUIVALENCE statement specifies that the storage sequences of the character entities whose names appear in a list nlist have the same first character storage unit. This causes the association of the entities in the list nlist and may cause association of other entities ( 17.1). Any adjacent characters in the associated entities may also have the same character storage unit and thus may also be associated. In the example:
the association of A, B, and C can be graphically illustrated as:
| 01| 02| 03| 04| 05| 06| 07| | --------A--------| --------B--------| | ----C(1)----| ----C(2)----|
The use of an array name unqualified by a subscript in an EQUIVALENCE statement has the same effect as using an array element name that identifies the first element of the array.
is prohibited, because it would specify the same storage unit for A(1) and A(2). An EQUIVALENCE statement must not specify that consecutive storage units are to be nonconsecutive. For example, the following is prohibited:
COMMON [/[cb]/] nlist [/[cb]/ nlist]...
Each omitted cb specifies the blank common block. If the first cb is omitted, the first two slashes are optional.
In each COMMON statement, the entities whose names appear in an nlist following a block name cb are declared to be in common block cb . If the first cb is omitted, all entities whose names appear in the first nlist are specified to be in blank common. Alternatively, the appearance of two slashes with no block name between them declares the entities whose names appear in the list nlist that follows to be in blank common.
Any common block name cb or an omitted cb for blank common may occur more than once in one or more COMMON statements in a program unit. The list nlist following each successive appearance of the same common block name is treated as a continuation of the list for that common block name.
If a character variable or character array is in a common block, all of the entities in that common block must be of type character.
Within an executable program, all named common blocks that have the same name must be the same size. Blank common blocks within an executable program are not required to be the same size.
The appearance of the symbolic name of a constant, variable, array, external function, or statement function in a type-statement specifies the data type for that name for all appearances in the program unit. Within a program unit, a name must not have its type explicitly specified more than once.
A type-statement that confirms the type of an intrinsic function whose name appears in the Specific Name column of Table 5 is not required, but is permitted. If a generic function name appears in a type-statement, such an appearance is not sufficient by itself to remove the generic properties from that function.
The name of a main program, subroutine, or block data subprogram must not appear in a type-statement.
CHARACTER [*len ] nam [,nam]...
A length len immediately following the word CHARACTER is the length specification for each entity in the statement not having its own length specification. A length specification immediately following an entity is the length specification for only that entity. Note that for an array the length specified is for each array element. If a length is not specified for an entity, its length is one.
An entity declared in a CHARACTER statement must have a length specification that is an integer constant expression, unless that entity is an external function, a dummy argument of an external procedure, or a character constant that has a symbolic name.
If a dummy argument has a len of (*) declared, the dummy argument assumes the length of the associated actual argument for each reference of the subroutine or function. If the associated actual argument is an array name, the length assumed by the dummy argument is the length of an array element in the associated actual argument array.
If an external function has a len of (*) declared in a function subprogram, the function name must appear as the name of a function in a FUNCTION or ENTRY statement in the same subprogram. When a reference to such a function is executed, the function assumes the length specified in the referencing program unit.
The length specified for a character function in the program unit that references the function must be an integer constant expression and must agree with the length specified in the subprogram that specifies the function. Note that there always is agreement of length if a len of (*) is specified in the subprogram that specifies the function.
If a character constant that has a symbolic name has a len of (*) declared, the constant assumes the length of its corresponding constant expression in a PARAMETER statement.
The length specified for a character statement function or statement function dummy argument of type character must be an integer constant expression.
The form of an IMPLICIT statement is:
IMPLICIT typ (a [,a]...) [,typ (a [,a]...)]...
An IMPLICIT statement specifies a type for all variables, arrays, symbolic names of constants, external functions, and statement^ functions that begin with any letter that appears in the specification, either as a single letter or included in a range of letters. IMPLICIT statements do not change the type of any intrinsic functions. An IMPLICIT statement applies only to the program unit that contains it.
Type specification by an IMPLICIT statement may be overridden or confirmed for any particular variable, array, symbolic name of a constant, external function, or statement function name by the appearance of that name in a type-statement. An explicit type specification in a FUNCTION statement overrides an IMPLICIT statement for the name of that function subprogram. Note that the length is also overridden when a particular name appears in a CHARACTER or CHARACTER FUNCTION statement.
Within the specification statements of a program unit, IMPLICIT statements must precede all other specification statements except PARAMETER statements. A program unit may contain more than one IMPLICIT statement.
The same letter must not appear as a single letter, or be included in a range of letters, more than once in all of the IMPLICIT statements in a program unit.
The form of a PARAMETER statement is:
PARAMETER (p=e [,p=e]...)
If the symbolic name p is of type integer, real, double precision, or complex, the corresponding expression e must be an arithmetic constant expression ( 6.1.3). If the symbolic name p is of type character or logical, the corresponding expression e must be a character constant expression ( 6.2.3) or a logical constant expression ( 6.4.4), respectively.
Each p is the symbolic name of a constant that becomes defined with the value determined from the expression e that appears on the right of the equals, in accordance with the rules for assignment statements ( 10.1, 10.2, and 10.4).
Any symbolic name of a constant that appears in an expression e must have been defined previously in the same or a different PARAMETER statement in the same program unit.
A symbolic name of a constant must not become defined more than once in a program unit.
If a symbolic name of a constant is not of default implied type, its type must be specified by a type-statement or IMPLICIT statement prior to its first appearance in a PARAMETER statement. If the length specified for the symbolic name of a constant of type character is not the default length of one, its length must be specified in a type-statement or IMPLICIT statement prior to the first appearance of the symbolic name of the constant. Its length must not be changed by subsequent statements including IMPLICIT statements.
Once such a symbolic name is defined, that name may appear in that program unit in any subsequent statement as a primary in an expression or in a DATA statement ( 9.1). A symbolic name of a constant must not be part of a format specification. A symbolic name of a constant must not be used to form part of another constant, for example, any part of a complex constant.
A symbolic name in a PARAMETER statement may identify only the corresponding constant in that program unit.
The form of an EXTERNAL statement is:
EXTERNAL proc [,proc]...where each proc is the name of an external procedure, dummy procedure, or block data subprogram. Appearance of a name in an EXTERNAL statement declares that name to be an external procedure name or dummy procedure name, or block data subprogram name. If an external procedure na`)me or a dummy procedure name is used as an actual argument in a program unit, it must appear in an EXTERNAL statement in that program unit. Note that a statement function name must not appear in an EXTERNAL statement.
If an intrinsic function name appears in an EXTERNAL statement in a program unit, that name becomes the name of some external procedure and an intrinsic function of the same name is not available for reference in the program unit.
Only one appearance of a symbolic name in all of the EXTERNAL statements of a program unit is permitted.
The form of an INTRINSIC statement is:
INTRINSIC fun [,fun]...where each fun is an intrinsic function name.
Appearance of a name in an INTRINSIC statement declares that name to be an intrinsic function name. If a specific name of an intrinsic function is used as an actual argument in a program unit, it must appear in an INTRINSIC statement in that program unit. The names of intrinsic functions for type conversion (INT, IFIX, IDINT, FLOAT, SNGL, REAL, DBLE, CMPLX, ICHAR, CHAR), lexical relationship (LGE, LGT, LLE, LLT), and for choosing the largest or smallest value (MAX, MAX0, AMAX1, DMAX1, AMAX0, MAX1, MIN, MIN0, AMIN1, DMIN1, AMIN0, MIN1) must not be used as actual arguments.
The appearance of a generic function name in an INTRINSIC statement does not cause that name to lose its generic property.
Only one appearance of a symbolic name in all of the INTRINSIC statements of a program unit is permitted. Note that a symbolic name must not appear in both an EXTERNAL and an INTRINSIC statement in a program unit.
The form of a SAVE statement is:
SAVE [a [,a]...]where each a is a named common block name preceded and followed by a slash, a variable name, or an array name. Redundant appearances of an item are not permitted.
Dummy argument names, procedure names, and names of entities in a common block must not appear in a SAVE statement.
A SAVE statement without a list is treated as though it contained the names of all allowable items in the program unit.
The appearance of a common block name preceded and followed by a slash in a SAVE statement has the effect of specifying all of the entities in that common block.
If a particular common block name is specified by a SAVE statement in a subprogram of an executable program, it must be specified by a SAVE statement in every subprogram in which that common block appears.
A SAVE statement is optional in a main program and has no effect.
If a named common block is specified in a SAVE statement in a subprogram, the current values of the entities in the common block storage sequence ( 8.3.3) at the time a RETURN or END statement is executed are made available to the next program unit that specifies that common block name in the execution sequence of an executable program.
If a named common block is specified in the main program unit, the current values of the common block storage sequence are made available to each subprogram that specifies that named common block; a SAVE statement in the subprogram has no effect.
The definition status of each entity in the named common block storage sequence depends on the association that has been established for the common block storage sequence ( 17.2 and 17.3).
If a local entity that is specified by a SAVE statement and is not in a common block is in a defined state at the time a RETURN or END statement is executed in a subprogram, that entity is defined with the same value at the next reference of that subprogram.
The execution of a RETURN statement or an END statement within a subprogram causes all entities within the subprogram to become undefined except for the following:
webmaster MFA (main)