number

This module provides basic utility functions to interact with Number values.

Functions

fromString(strNum)

Converts a String to a Number.

ArgumentDescription
strNumA string representing a valid number.

Returns: A valid Number or null.

fromNumber(val)

Converts an Integer to a Number by using the rounding used by the C compiler when casting TIntegers to TNumbers. If the value to convert is already a Number the value is returned unmodified. If the provided value was not an Integer or a Number an error is raised.

ArgumentDescription
valThe value to be converted to a Number, either an Integer or a Number

Returns: A valid Number.