Floats are truncated to integer values, strings with leadings
digits are converted to integers up to the first non-digit.
lfun-closures are converted into their function index (not adjusted
for inheritance), variable closure are converted into their variable
Integers are just returned.
Regarding floats, it is important to keep rounding effects
in mind: to_int(3.1*10.0) does not return 31, but instead 30,
because internally the result of the multiplication is 30.999999.
The function supports the '0x', '0o' and '0b' base prefixes.
The cast notation only works if the precise type of <value>
is known at compile-time. This will not be fixed - use the
function form instead.
Introduced in 3.2.1@2.
LDMud 3.2.11/3.3.611 added support for the base prefixes.