XL Fortran for AIX 8.1

Language Reference


REPEAT(STRING, NCOPIES)

Concatenate several copies of a string.

STRING
must be scalar and of type character.

NCOPIES
must be scalar and of type integer. Its value must not be negative.

Class

Transformational function

Result Type and Attributes

Character scalar with a length equal to NCOPIES * LENGTH(STRING), with the same kind type parameter as STRING.

Result Value

The value of the result is the concatenation of NCOPIES copies of STRING.

Examples

REPEAT ('H', 2) has the value 'HH'. REPEAT ('XYZ', 0) has the value of a zero-length string.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]