FORTRAN Reference Manual
Expressions
FORTRAN Reference Manual—528615-001
3-6
Character Expressions
Character Expressions
A character expression is composed of character elements and the concatenation
operator. The evaluation of a character expression produces a result of type character.
The syntax of a character expression is:
char-element
is a constant, symbolic constant, variable, RECORD name, array element,
substring reference, function reference, or another character expression. char-
element must be of type character.
//
is the concatenation operator.
The result of a character expression is a string, whose length is equal to the combined
lengths of all the character elements appearing in the expression. The following
constant character expression:
'Tomorrow'//' and tomorrow'//' and tomorrow--'
has the value
Tomorrow and tomorrow and tomorrow--
A character expression can contain up to 64 operands. A character expression cannot
contain an operand whose length specification is an asterisk in parentheses, unless
the operand is a symbolic constant.
Parentheses do not affect the value of a character expression. The following
expressions are identical:
name // city // zip
name // (city // zip)
char-element [ // char-element ]...










