Determines whether or not passed value is an floating point number.
JSV_isFloat(expF)
n/a
The isFloat function returns true if the expression expF contains is a floating point value; otherwise, false.
The isFloat function uses the following arguments.
Argument | Description |
expF | Value that is to be evaluated to see if it is a floating point number. |
Allowable values in a floating point number include '-', '.', and the digits 0 through 9. This function assumes that a floating point number contain a decimal point; otherwise, it is an integer.
JSV_toString, JSV_occurs, JSV_stripCharacters
The following lines of code
var f = 54.87;
document.write( "The number " + f + " is a float? " + JSV_isFloat(f) );
f = 54;
document.write( "The number " + f + " is a float? " + JSV_isFloat(f) );
f = 0.54;
document.write( "The number " + f + " is a float? " + JSV_isFloat(f) );
produce
Copyright © 1998-2000 Roaring Fork Software. All rights reserved.