The system function MathLib.stringAsDecimal accepts a character value (like "98.6") and returns the equivalent value of type DECIMAL. If the input is non-numeric, the function returns a NULL.
MathLib.stringAsDecimal(numberAsText STRING in) returns (result DECIMAL nullable)
EGL allows as many as 32 digits on either side of the decimal point. The decimal point (if any) is specific to the Java™ locale.
For details on the implications of assigning numeric values to fields of different types, see Assignments.
myField = "-5.243"; // result = -5.243 result = MathLib.stringAsDecimal(myField);
Related concepts
Syntax diagram for EGL functions
Related reference
Assignments
EGL library MathLib