Manual Reference Pages  - repeat (3fortran)

NAME

REPEAT(3) - [CHARACTER] Repeated string concatenation

SYNOPSIS

result = repeat(string, ncopies)

         character(len=len(string)*ncopies) function repeat(string, ncopies)

character(len=*),intent(in) :: string integer(kind=**),intent(in) :: ncopies

CHARACTERISTICS

o a kind designated as ** may be any supported kind for the type
o STRING is a scalar character type.
o NCOPIES is a scalar integer.
o the result is a new scalar of type character of the same kind as

    STRING

DESCRIPTION

REPEAT(3) concatenates copies of a string.

OPTIONS

o STRING : The input string to repeat
o NCOPIES : Number of copies to make of STRING, greater than or equal to zero (0).

RESULT

A new string built up from NCOPIES copies of STRING.

EXAMPLES

Sample program:

    program demo_repeat
    implicit none
        write(*,’(a)’) repeat("^v", 35)         ! line break
        write(*,’(a)’) repeat("_", 70)          ! line break
        write(*,’(a)’) repeat("1234567890", 7)  ! number line
        write(*,’(a)’) repeat("         |", 7)  !
    end program demo_repeat

Results:

     > ^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v
     > ______________________________________________________________________
     > 1234567890123456789012345678901234567890123456789012345678901234567890
     >          |         |         |         |         |         |         |

STANDARD

Fortran 95

SEE ALSO

Functions that perform operations on character strings:
o ELEMENTAL: ADJUSTL(3), ADJUSTR(3), INDEX(3), SCAN(3), VERIFY(3)
o NON-ELEMENTAL: LEN_TRIM(3), LEN(3), REPEAT(3), TRIM(3)
fortran-lang intrinsic descriptions (license: MIT) @urbanjost


Nemo Release 3.1 repeat (3fortran) April 28, 2024
Generated by manServer 1.08 from 59141727-ae81-46b5-bc2b-503adf546928 using man macros.