REPLACE Examples


Example 1:

 

  

REPLACE

SENDING IN RECVING

 

 

Variable

PL

FP

LP

Contents

Before:

SENDING

4

1

4

1A2B

 

RECVING

10

3

10

1234511322

 

After:

SENDING

4

1

4

1A2B

 

RECVING

10

3

10

12345AA3BB

 

The EQUAL (or ZERO) Condition Flag is set.

 

Example 2:

 

 

Variable

PL

FP

LP

Contents

Before:

SENDING

4

1

4

6A7B

 

RECVING

10

3

10

1234511322

 

After:

All fields remain unchanged.

 

No Condition Flags are set (all FALSE) since no replacement occurred.

 

Example 3:

 

 

Variable

PL

FP

LP

Contents

Before:

SENDING

4

1

3

1A2B

 

RECVING

10

3

10

1111122222

 

After:

All fields remain unchanged.

 

The EOS Condition Flag is set. SENDING's Logical String is 3 bytes.

 



PL/B Language Reference RENAME Examples REPOSIT Example