A character substring is a contiguous segment of a character variable or character array element. It takes one of the following forms:
v ([e1]:[e2]) a (s [,s] . . . ) ([e1]:[e2])
Character positions within a character variable or array element
are numbered from left to right, beginning at one. For example,
LABEL(2:7) specifies the substring beginning with the second
character position and ending with the seventh character position
of the character variable LABEL. If the CHARACTER*8 variable LABEL
has a value of
If the value of the numeric expression e1 or e2 is
not of type integer, it is converted to an integer before use (any
fractional parts are truncated). '
XVERSUSY'
, then the
substring LABEL(2:7) has a value of VERSUS.
The values of the numeric expressions e1 and e2 must meet the following conditions:
(1 .LE. e1) .AND. (e1 .LE. e2) .AND. (e2 .LE. len)
If e1 is omitted, Fortran assumes that e1 equals one. If e2 is omitted, Fortran assumes that e2 equals len. For example, NAMES(1,3)(:7) specifies the substring starting with the first character position and ending with the seventh character position of the character array element NAMES(1,3).