Ny-Series Instructions Reference Manual (W560 - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

2 Instruction Descriptions
The following example is for when In1 is 'ABCDEF', In2 is 'GHI', P is UINT#2, and L is UINT#4. The
value of variable abc will be 'AGHIF'.
LD
'ABCDEF'
'GHI'
UINT#4
UINT#2
Deleted
'ABCDEF'
In
Insert
Repl
'GHI'
Precautions for Correct Use
• If L is 0, an error will not occur and all of the characters in In1 are inserted to Out.
• If the value of In2 is 0, L characters are deleted from P in In1.
• Multi-byte characters are counted as one character each.
• An error occurs in the following cases. ENO will be FALSE, and Out will not change.
• In1 results in a character code error.
• In1 does not have enough characters for the number of characters specified by L from the position
specified by P.
• The value of P is 0.
• The length of the character string after the replacement exceeds 1,986 bytes.
2-558
ST
REPLACE
EN
ENO
abc
In1
In2
L
P
Out=abc
abc:=REPLACE('ABCDEF', 'GHI', UINT#4, UINT#2);
'AGHIF'

NY-series Instructions Reference Manual (W560)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents