STRS function

Syntax

STRS (dynamic.array, repeat)
CALL -STRS (return.array, dynamic.array, repeat)
CALL !STRS (return.array, dynamic.array, repeat)

Description

Use the STRS function to produce a dynamic array containing the specified number of repetitions of each element of dynamic.array.

dynamic.array is an expression that evaluates to the strings to be generated.

repeat is an expression that evaluates to the number of times the elements are to be repeated. If it does not evaluate to a value that can be truncated to a positive integer, an empty string is returned for dynamic.array.

If dynamic.array evaluates to the null value, null is returned. If any element of dynamic.array is the null value, null is returned for that element. If repeat evaluates to the null value, the STRS function fails and the program terminates with a run-time error message.

If you use the subroutine syntax, the resulting dynamic array is returned as return.array.

Example

ABC="A":@VM:"B":@VM:"C"
PRINT STRS(ABC,3)

This is the program output:

AAAVBBBVCCC