インテル® Fortran コンパイラー 14.0 ユーザー・リファレンス・ガイド

REPEAT

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

関連情報


このヘルプトピックについてのフィードバックを送信