FORTRAN Reference Manual
Language Elements
FORTRAN Reference Manual—528615-001
2-19
Substrings
Second, using the array-element you just calculated, determine the byte offset of the 
character relative to the beginning of the array. The character storage position is equal 
to:
1 + (array-element -1) * character-length
1 + 102 * 10
1021
Considerations
•
Use a DIMENSION, type-declaration, or COMMON statement to declare the 
number of dimensions and the number of elements in each dimension of an array. 
•
You must declare the array before the first reference to the array.
•
Declare the array type explicitly unless you want the array to be typed by default.
•
Do not use subscript values that are outside the range of the declared minimum 
and maximum bounds of the array. For additional information, see the 
BOUNDSCHECK Compiler Directive on page 10-8. 
•
You can use an arithmetic expression that evaluates to an integer to determine a 
subscript value.
•
If you use an unsubscripted array name, the compiler assumes that you are 
referencing the entire array.
•
You cannot redefine the dimensions or size of an array within an executable 
program.
For a discussion of assumed-size and adjustable-size array declarators, see Section 4, 
Program Units.
Substrings
You can reference a character-type variable in its entirety or in part. To reference a part 
of a character-type variable, you must append a subscript reference to the variable 
name. A subscript reference uses the form: 
var-name
is the name of the variable
first
specifies the position of the first character in the substring
var-name ( [ first ] : [ last ] )










