num
This function converts a variable to a plain numeral.
Vectorization: This function supports vectorization in the 1st function parameter.
Instead of providing a single value, you can provide a set or even a nested set which contain multiple values.
The function will then process every value and its return value contains a corresponding set containing all results.
Indirect parameter passing is disabled
Vectorization is allowed in the 1st function parameter
1
No. | Type | Description |
---|---|---|
1 input |
valid types | Value Strings containing numbers (no text before numbers) are converted properly. Scientific notation is supported. |
Type | Description |
---|---|
numeral set |
number Contains resulting number. No string context of the number is preserved or included. If vectorization has been applied, a set containing results will be returned. |
echo( num( '1.2E+03' ) );
echo( num( true ) );
echo( num( 0123 ) );
echo( num( date ( "05. Nov 2019 12:00" ) ) );
1200
1
123
20191105.5
string conversion functions
date
pure date
date time
clean num
smart num