CMATCH Examples


Example 1:

 

  

CMATCH

SENDING TO RECV(X)

 

 

Variable

PL

FP

LP

Contents

Before:

SENDING

10

1

5

ABCDE·····

 

RECV(X)

8

6

6

FEDCBA··

 

After:

Both variables remain unchanged.

 

The EQUAL (or ZERO) Condition Flag is set.

 

Example 2:

 

 

Variable

PL

FP

LP

Contents

Before:

SENDING

10

4

5

ABCDE·····

 

RECV(X)

8

2

6

FEDCBA··

 

After:

Both variables remain unchanged.

 

No Condition Flags are set (all FALSE). The destination character (E) is neither equal nor less than the source character (D).

 

Example 3:

 

 

Variable

PL

FP

LP

Contents

Before:

SENDING

10

3

5

ABCDE·····

 

RECV(X)

8

5

6

FEDCBA··

 

After:

Both variables remain unchanged.

 

The LESS Condition Flag is set. The destination character (B) is less than the source character (C).

 

Example 4:

 

  

CMATCH

RECVING to "E"

 

 

Variable

PL

FP

LP

Contents

Before:

RECVING

8

2

6

FEDCBA··

 

After:

RECVING remains unchanged.

 

The EQUAL (or ZERO) Condition Flag is set.

 

Example 5:

 

  

CMATCH

0107 TO RECVING

 

 

Variable

PL

FP

LP

Contents

Before:

RECVING

8

1

6

FEDCBA··

 

After:

RECVING remains unchanged.

 

The LESS Condition Flag is set. The octal 0107 represents the letter `G'.

 

Example 6:

 

  

CMATCH

"#" TO RECV

 

 

Variable

PL

FP

LP

Contents

Before:

RECV

10

3

5

AB#CDE·····

 

After:

RECV remain unchanged.

 

The EQUAL (or ZERO) Condition Flag is set.

 



PL/B Language Reference CLOCK Examples CMOVE Examples