MOVE - Character String to Numeric Field Examples


Example 1:

 

  

MOVE

STRING TO NUM

 

 

Variable

PL

FP

LP

Contents

Before:

STRING

5

1

5

15.00

 

NUM

8

 

 

•••75.50

 

After:

STRING

5

1

5

15.00

 

NUM

8

 

 

•••15.00

 

No Condition Flag is set (all FALSE).

 

Example 2:

 

 

Variable

PL

FP

LP

Contents

Before:

STRING

10

6

10

ABCDE75.00

 

NUM

8

 

 

••215.00

 

After:

STRING

10

6

10

ABCDE75.00

 

NUM

8

 

 

•••75.00

 

No Condition Flag is set (all FALSE).

 

Example 3:

 

 

Variable

PL

FP

LP

Contents

Before:

STRING

10

1

7

500.257HIJ

 

NUM

8

 

 

•••10.00

 

After:

STRING

10

1

7

500.257HIJ

 

NUM

8

 

 

••500.26

 

No Condition Flag is set (all FALSE).

 

Example 4:

 

 

Variable

PL

FP

LP

Contents

Before:

STRING

10

1

10

1500000.00

 

NUM

8

 

 

•••75.00

 

After:

STRING

10

1

10

1500000.00

 

NUM

8

 

 

•••••.00

 

The OVER and ZERO Condition Flags are set. Significant digits are lost and the result is equal to zero.

 

Example 5:

 

 

Variable

PL

FP

LP

Contents

Before:

STRING

10

1

10

1500018.00

 

NUM

8

 

 

•••75.00

 

After:

STRING

10

1

10

1500000.00

 

NUM

8

 

 

•••18.00

 

The OVER Condition Flag is set. Significant digits are lost.

 

Example 6:

 

 

Variable

PL

FP

LP

Contents

Before:

STRING

10

0

6

510.25GHIJ

 

NUM

8

 

 

•••75.00

 

After:

STRING

10

0

6

510.25GHIJ

 

NUM

8

 

 

•••75.00

 

The EOS Condition Flag is set because STRING is a Null String.

 

 



PL/B Language Reference MOVE - Character String to Integer Examples MOVE - Integer to Character String Examples