TEST Examples


Example 1:

 

  

TEST

SENDING TO RECVING

 

 

Variable

PL

FP

LP

Contents

Before:

SENDING

6

3

6

ABCDEF

 

RECVING

8

1

8

N2345678

 

After:

All variables remain unchanged.

 

No Condition Flags are set (all FALSE).

 

     'C' ==> 0100 0011

     'N' ==> 0100 1110

               ---------

     'B' ==> 0100 0010

 

Example 2:

 

  

TEST

020 TO BITMAP

 

 

Variable

PL

FP

LP

Contents

Before:

BITMAP

1

1

1

P

 

After:

BITMAP

1

1

1

P

 

No Condition Flags are set (all FALSE).

 

     'P' ==> 0101 0000

     020 ==> 0001 0000

               ---------

     020 ==> 0001 0000

 

Example 3:

 

  

TEST

BIT3,STATUS

 

 

Variable

PL

FP

LP

Contents

Before:

BIT3

1

 

 

0x100

 

STATUS

2

 

 

0x0100000 01110111

 

After:

All variables remain unchanged.

 

No Condition Flags are set (all FALSE).

 

          4 ==> 0000 0100

     0x2077 ==> 0010 0000 0111 0111

                 -------------------

     0x2077 ==> 0010 0000 0111 0111

 

Example 4:

 

  

TEST

FLAG

 

 

Variable

PL

FP

LP

Contents

Before:

FLAG

1

 

 

1

 

After:

All variables remain unchanged.

 

The ZERO Condition Flag is set. The LESS Condition Flag is cleared.

Example 5:

 

 DL

DATALIST

 

 

CREATE

DL=1:20:1:40

.

 

 

 

TEST

DL

 

The ZERO, , and LESS Conditions Flag are cleared since the object exists.

 



PL/B Language Reference TANH Example TITLE Example