long
| Syntax |
long (value)
|
| Params |
value is the object whose datatype you wish to coerce to be a 32-bit signed value.
|
| Action |
Coerces the datatype of value to be a 32-bit signed numeric value if possible.
|
| Returns |
The numeric value produced by the coercion if it is successful; otherwise an error.
|
| Examples |
long ("123456") » 123456
long (1575.23)
long (infinity)
The example above shows the largest value that can be represented by a 32-bit signed number.
long (123.98)
The example above shows that long truncates the value rather than rounding it. |
| Errors |
If value is an improperly formatted string, or a type that cannot be coerced to a number, an error message is generated.
|
| Notes |
See the discussion of datatypes in Chapter 1 of the UserTalk Reference Guide for information on the range of values that can be represented by a long number, and for other details.
|