Concept Framework 1.0 documentation Contents | Index

standard.C.casts.float

Name Version Deprecated
float version 1.0 no

Prototype:
number float(number)


Description:
Gets the floating point (float C type) of a static number (double C type).

Example:
import standard.C.casts


class Main {
function Main() {
var decimal_number=-12.345;
var a_number=12337500087987979123123;

echo "The float representation of " + decimal_number + " is ";
echo float(decimal_number);
echo "\n";

echo "The float representation of " + a_number + " is ";
echo float(a_number);
echo "\n";

}
}


Results
The float representation of -12.345000000000001 is -12.345000267028809
The float representation of 12337500087987980000000 is 12337499715090696000000

Returns:
Returns the floating point (float C type) of a static number (double C type).

Documented by Simona Gabriela Plesuvu, generation time: Thu Oct 15 20:02:02 2009 GMT(c)2009 RadGs Software