repeat(3f) - [FORTRAN:INTRINSIC:CHARACTER] Repeated string concatenation
Syntax
Description
Arguments
Return Value
Example
Standard
Class
See Also
result = repeat(string, ncopies)
Concatenates NCOPIES copies of a string.
STRING - Shall be scalar and of type CHARACTER. NCOPIES - Shall be scalar and of type INTEGER.
A new scalar of type CHARACTER built up from NCOPIES copies of STRING.
Sample program:
program demo_repeat write(*,*) repeat("x", 5) ! "xxxxx" end program demo_repeat
[[Fortran 95]] and later
Transformational function
Functions that perform operations on character strings, return lengths of arguments, and search for certain arguments:
Elemental: ADJUSTL, ADJUSTR, INDEX, LEN_TRIM, SCAN, VERIFY; Nonelemental: REPEAT, TRIM
repeat (3) | March 19, 2019 |