SQRT Examples


Example 1:

 

  

SQRT

VALUE,RESULT

 

 

Variable

Format

Contents

Before:

VALUE

1

9

 

RESULT

2

•2

 

After:

VALUE

1

9

 

RESULT

2

•3

 

No Condition Flag is set.

 

Example 2:

 

 

Variable

Format

Contents

Before:

VALUE

3

100

 

RESULT

1

3

 

After:

VALUE

3

100

 

RESULT

1

0

 

The OVER Condition Flag is set. BASE was too small to contain 10. The LESS and ZERO Condition Flags are unpredictable.

 

Example 3:

 

  

SQRT

"-81",RECVING

 

 

Variable

Format

Contents

Before:

RECVING

5.2

••121.00

 

After:

RECVING

5.2

••121.00

 

The LESS Condition Flag is set. The source operand has a negative amount.

 

 



PL/B Language Reference SQL Example SQUEEZE Examples