FORTRAN Reference Manual
Statements
FORTRAN Reference Manual—528615-001
7-3
Type Declaration Statements—LOGICAL
subroutine or function. If the actual argument is an array name, len equals the 
length of an array element.
°
If an external function uses the (*) length specification in a function 
subprogram, the function name must appear as the name of a function in a 
FUNCTION or ENTRY statement within the same subprogram. When a calling 
program unit references this function, len assumes the length declared for 
that external function name in the calling program unit.
°
If a symbolic character constant uses the (*) length specification, the constant 
assumes the length of its corresponding constant expression in the 
PARAMETER statement. In the following example the symbolic constant name 
MONTH has a length of 7:
CHARACTER *(*) month
PARAMETER (month = 'january')
•
The length specification for a character function declared in any program unit that 
references the function must agree with the length specification in the subprogram 
that defines the function.
Example
In the following statement, the variables SCHOOL, CITY, and STATE each have a 
declared length of 8, and the variable NAME has a declared length of 20.
CHARACTER * 8 name * 20, school, city, state
Type Declaration Statements—LOGICAL
The LOGICAL statement defines a variable, array, symbolic constant, RECORD field, 
function name, or dummy procedure name as logical type.
name
is the symbolic name of a constant, variable, array, RECORD field, function or 
dummy procedure.
dimension
is an array bounds specification in the form:
( [ lower:] upper [, [ lower:] upper ]... )
where lower is an integer expression indicating the lower bound, and upper is an 
integer expression indicating the upper bound of an array dimension.
LOGICAL name [ dimension] [, name [ dimension] ]...










