Intel® Fortran Compiler 18.0 Developer Guide and Reference
Transformational Intrinsic Function (Generic): Concatenates several copies of a string.
result = REPEAT (string,ncopies)
string |
(Input) Must be scalar and of type character. |
ncopies |
(Input) Must be scalar and of type integer. It must not be negative. |
The result is a scalar of type character and length ncopies x LEN( string). The kind parameter is the same as string. The value of the result is the concatenation of ncopies copies of string.
REPEAT ('S', 3) has the value SSS.
REPEAT ('ABC', 0) has the value of a zero-length string.
The following shows another example:
CHARACTER(6) str
str = REPEAT('HO', 3) ! returns HOHOHO