Rockwell-automation 1746-BAS BASIC LANGUAGE User Manual Page 244

  • Download
  • Add to my manuals
  • Print
  • Page
    / 280
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 243
Publication 1746-RM001A-US-P
15-2 String Functions
Example
>1 REM EXAMPLE PROGRAM
>10 REM STRING REPEAT EXAMPLE PROGRAM
>20 STRING 200,48
>30 $(1) = “*”
>40 PUSH 40 : REM THE NUMBER OF TIMES TO REPEAT CHARACTER
>50 PUSH 1 : REM BASE STRING NUMBER
>60 CALL 60
>70 PRINT $(1)
>80 END
READY
>RUN
****************************************
READY
>
CALL 61 – String Append
Purpose
Use CALL 61 to append one string to the end of another string. This CALL
expects two string arguments. The first is the string number of the string to be
appended and the second is the string number of the base string. If the resulting
string is longer than the maximum string length, the append characters are lost.
There are no output arguments. This is a string concatenation assignment:
(example:
$(1)=$(1)+$(2)).
Syntax
PUSH [string number to be appended]
PUSH [base string number]
CALL 61
IMPORTANT
If the new string length exceeds the length allocated by the string
command, an error message is printed on the console device and
the module enters Command mode.
Page view 243
1 2 ... 239 240 241 242 243 244 245 246 247 248 249 ... 279 280

Comments to this Manuals

No comments