11 - 143 11 - 143
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
Program Example
10 ' Replaces character string
20 A$="ABCDEFGHI"
:
' Defines character string
30 B$="XYZ"
:
' Defines character string to replace with
40 PRINT "Original Character String-------->";A$
50 MID$(A$,3,3)=B$
:
' Replaces
60 PRINT "Character string after replacement-->";A$
70 END
RUN
Original character string -------->ABCDEFGHI
Character string after replacement-->ABXYZFGHI
OK
REMARK
See the MID$ (Part 2) function and Section 3.13.