CHECK11 Example


Example:

 

  

CHECK11

BASENBR TO WTFACTR,CHKDIGIT

 

 

Variable

PL

FP

LP

Contents

Before:

BASENBR

4

1

4

8544

 

WTFACTR

3

1

3

212

 

CHKDIGIT

1

1

1

x

 

After:

CHKDIGIT

1

1

1

4

 

BASENBR and WTFACTR remain unchanged

 

The EQUAL Condition Flag is set.

 

The computation is as follows:

 

     2 times 8 = 16

     1 times 5 = 5

     2 times 4 = 8

     16 + 5 + 8 = 29

     29 / 11 = 2 with a remainder of 7

     C = 11 - 7 = 4 (computed check digit)

 

 



PL/B Language Reference CHECK10 Examples CHECKITEM Example