ADELIA |
VADELIA |
SADELIA |
WADELIA |
EADELIA |
(I/B) |
(I/B) (C/S) |
(B) (S) |
(I/B) (C/S) |
(B) (C/S) |
Section for use
All
Syntax
SQUARE_ROOT VarId1 VarId2
Description
This instruction calculates the square root of variable VarId1 and assigns the result in variable VarId2.
The definitions of VarId1 and VarId2 follow specific rules:
the two variables must be numeric,
the number of decimals in the variable 2 cannot be less than half the number of decimals in the variable 1,
if the variable 1 is negative, the system sends an error message.
Example
* A 10-digit variable W10N5 with 5 decimals, has a value of 25.00000
SQUARE_ROOT W10N5 W7N3
* The 7-digit variable W7N3 with 3 decimals will have the value 5.000
* after executing the instruction.
* Note that a variable like W7N1 (7 digits, 1 decimal) will not be accepted
* when compiling the program.