Rockwell Automation 1771-DB Basic Module User Manual - Series A User Manual

Page 123

Advertising
background image

Operating Functions

Chapter 5

5–86

5.10.3.8
Delete String from a String – CALL 67

This routine deletes a string from within another string. The call expects
two arguments. The first argument is the base string number. The second is
the string number of the string to be deleted from the base string. This
routine has no return arguments.

Important: This routine deletes only the first occurrence of the string.

u10 REM ROUTINE TO DELETE A STRING IN A STRING

u20 STRING

200,14

u30 $(1)=“123456789012”

u40 $(2)=“12”

u50 PRINT “BEFORE: $1=“,$(1)

u60 PUSH 1 :REM BASE STRING NUMBER

u70 PUSH 2 :REM STRING NUMBER OF THE STRING TO BE DELETED

u80 CALL 67 :REM INVOKE STRING DELETE ROUTINE

u90 PRINT “AFTER: $1=”,$(1)

u100 END
uRUN

BEFORE: $1=123456789012
AFTER: $1=3456789012

READY

5.10.3
String Support Calls
(continued)

Advertising