Description

Returns a string containing the expression repeated the specified number of times.

Syntax

Str(expression, count)

Parameters

The Str function has the following parameters.

ParametersDescription
expressionSpecifies the string value that is to be repeated. The expression must be a variable name or character string value.
countMust be a positive integer or must evaluate to a positive integer. It specifies the number of times to repeat expression. In the following example, the variable identifier X is assigned the string value containing 10 asterisk characters:

X = Str("*",10)

Note: The count parameter has an upper limit of 256MB. Any integer equal to or greater than 256MB will cause the system to abend.

Remarks

The string function has an upper limit of 256 MB. An

See also

Space()

Example

* The variable identifier X is given the value of 60 underlines.
X = Str("_", 60)
E = "XX"
* G is assigned the string value of XXXXXXXXXX.
G = Str(E, 5)
  • No labels