suve

awful : function : mkfloat

Declaration

float :mkfloat ( mixed &ARG , … )
float :mkflo ( mixed &ARG , … )

Summary

Takes any number of arguments and converts them to floats. If the argument is a variable reference, the variable type will be changed! Returns a copy of the leftmost argument. Typecast rules are the same as when performing implicit typecasts.

Example

# Typecast example.
:set &NUM i0
:read &NUM
:writeln (:typeof $NUM) s' ' :random $NUM
:mkfloat &NUM
:writeln (:typeof $NUM) s' ' :random $NUM

wikipage modified on 2014/0601/2317