Rockwell Automation 1771-DB Basic Module User Manual - Series A User Manual
Page 117
Advertising
Operating Functions
Chapter 5
5–80
5.10.3.1
String Repeat – CALL 60
This routine allows you to repeat a character and place it in a string. You
can use the String Repeat when designing output formats. First PUSH the
number of times to repeat the character, then PUSH the number of the
string containing the character to be repeated. No arguments are POPed.
You cannot repeat more characters than the string’s maximum length.
u10 REM STRING REPEAT EXAMPLE PROGRAM
u20 STRING 1000,50
u30 $(1)=“*”
u40 PUSH 40 :REM THE NUMBER OF TIMES TO REPEAT CHARACTER
u50 PUSH 1 :REM WHICH STRING CONTAINS CHARACTER
u60 CALL 60
u70 PRINT $(1)
u80 END
uRUN
*****************************************
READY
5.10.3
String Support Calls
(continued)
Advertising