REPEAT(3I) Last changed: 2-5-98
REPEAT - Concatenates several copies of a string
REPEAT ([STRING=]string, [NCOPIES=]ncopies)
UNICOS, UNICOS/mk, and IRIX systems
Fortran 90
The REPEAT intrinsic function concatenates several copies of a string.
It returns the specified number of concatenated copies of the input
string as the result. If the number of copies is zero, the result is
a string of zero length.
REPEAT accepts the following arguments:
string Must be a scalar and of type character.
ncopies Must be either 0 or a positive integer. Must also be a
scalar.
REPEAT is a transformational function. The name of this intrinsic
cannot be passed as an argument.
The result is a scalar entity of type character with a length of
ncopies times the length of string. The value of the result is the
concatenation of ncopies of string.
If ncopies is zero, the result is a string of zero length.
In the following program, a literal with a trailing blank is repeated.
CHARACTER*14 CHVAR
CHVAR = REPEAT('STRING ',2)
PRINT '(3A)', '>', CHVAR, '<'
END
The output of the program is:
>STRING STRING <
Intrinsic Procedures Reference Manual, publication SR-2138, for the
printed version of this man page.
REPEAT(3I) Last changed: 2-5-98
REPEAT - Concatenates several copies of a string
REPEAT ([STRING=]string, [NCOPIES=]ncopies)
UNICOS, UNICOS/mk, and IRIX systems
Fortran 90
The REPEAT intrinsic function concatenates several copies of a string.
It returns the specified number of concatenated copies of the input
string as the result. If the number of copies is zero, the result is
a string of zero length.
REPEAT accepts the following arguments:
string Must be a scalar and of type character.
ncopies Must be either 0 or a positive integer. Must also be a
scalar.
REPEAT is a transformational function. The name of this intrinsic
cannot be passed as an argument.
The result is a scalar entity of type character with a length of
ncopies times the length of string. The value of the result is the
concatenation of ncopies of string.
If ncopies is zero, the result is a string of zero length.
In the following program, a literal with a trailing blank is repeated.
CHARACTER*14 CHVAR
CHVAR = REPEAT('STRING ',2)
PRINT '(3A)', '>', CHVAR, '<'
END
The output of the program is:
>STRING STRING <
Intrinsic Procedures Reference Manual, publication SR-2138, for the
printed version of this man page.
[ Back ]
|