MathLib.decimals returns the number of decimal places in the type of a numeric variable.
eglx.lang
static function decimals(value decimal in) returns(int);
The function returns a zero if the variable is of an integer type or the FLOAT type.
After the following code runs, the value of result is 4:
myVar BIN(9,4); result = mathLib.decimals(myVar);
In the case of Java™, EGL uses methods in the Java StrictMath class that are equivalent to the EGL functions. This usage ensures that the runtime behavior is the same for every Java Virtual Machine.
Target | Issue |
---|---|
Java | No issues. |
JavaScript | No issues. |