1097
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Text String Processing Instructions
3
RPLC$
RPLC$
Applicable Program Areas
Operands
S1: Text String D: First Destination Word
S2: Replacement Text String
S3: Number of Characters
(0000 to 0FFF hex or &0 to &4095)
S4: Beginning Position
(0001 to 0FFF hex or &0 to &4095)
Note • The data from S1 to S1 + the maximum 2,047 words, from S2 to S2 + the maximum 2,047 words, and from D to D +
the maximum 2,047 words must be in the same area.
• The data from D to D + the maximum 2,047 words and from either S1 to S1 + the maximum 2,047 words or from S2
to S2 + the maximum 2,047 words cannot overlap.
Instruction Mnemonic Variations
Function
code
Function
REPLACE IN STRING RPLC$ @RPLC$ 661
Replaces a text string with a designated text string
from a designated position.
Symbol
RPLC$
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or transition
programs
Usage OK OK OK OK OK OK
Operand Description Data type Size
S1 Text string first word UINT Variable
S2 Replacement text string first word UINT Variable
S3 Number of characters UINT 1
S4 Beginning position UINT 1
D First destination word UINT Variable
S1: Text string first word
S2: Replacement text string first word
S3: Number of characters
S4: Beginning position
D: First destination word
RPLC$(661)
S1
S2
S3
S4
D
15 0
S1
to
Text string data: 4,095 characters max. + NUL
S1 + maximum 2,047 words
15 0
D
to
Text string data: 4,095 characters max. + NUL
S2 + maximum 2,047 words
15 0
S2
to
Text string data: 4,095 characters max. + NUL
S2 + maximum 2,047 words