Fortran Wiki
repeat

Description

Concatenates ncopies copies of a string.

Standard

Fortran 95 and later

Class

Transformational function

Syntax

result = repeat(string, ncopies)

Arguments

  • string - Shall be scalar and of type character.
  • ncopies - Shall be scalar and of type integer.

Return value

A new scalar of type character built up from ncopies copies of string.

Example

program test_repeat
  write(*,*) repeat("x", 5)   ! "xxxxx"
end program

category: intrinsics