Purpose
Returns the square root of a numeric value.
Syntax
►►─┬─ SQUARE-ROOT ─┬─ ( value ) ──────────────────────────────────────────────►◄ └─ SQRT ────────┘
Parameters
Specifies the numeric value whose square root is calculated. Value can be:
Value cannot be a negative number.
Example
In the following example, the square root function is used to calculate the square root of a number:
Initial value:
WK-VALUE: 256
Statement:
MOVE SQUARE-ROOT(WK-VALUE) TO WK-RESULT.
Returned value: 16
Another example of the square root function is provided in NEXT-INT-EQLO.
|
Copyright © 2014 CA.
All rights reserved.
|
|