Call 60: string repeat – Rockwell Automation 1771-DB BASIC MODULE User Manual
Page 249
![background image](/manuals/579953/249/background.png)
Chapter
Call Routines 0–68
12
12 -59
Use this routine to repeat a character and place it in a string. You can use
the string repeat when designing output formats. You cannot repeat more
characters than the string’s maximum length.
Input and Output Arguments
This routine has two input arguments and no output arguments. The first
input argument is the number of times you want to repeat the character.
The second input argument is the number of the string containing the
character you want to repeat.
Syntax
PUSH
number of times to repeat character
PUSH
number of string containing character to be repeated
CALL 60
Example
>20 STRING 1000,50
>30 $(1)=“*”
>40 PUSH 40: REM THE NUMBER OF TIMES TO REPEAT CHARACTER
>50 PUSH 1: REM WHICH STRING CONTAINS CHARACTER
>60 CALL 60
>70 PRINT $(1)
>80 END
>RUN
****************************************
CALL 60: String Repeat