Goto main content

isfloat

Checks if the argument is a float number.

ISFLOAT

NAME

isfloat - Checks if the argument is a float number.

SYNOPSIS

isfloat(variable);

DESCRIPTION

This function is used to determine if the argument is a float number.

A float number start with an optional + or - followed by an optional number followed by a dot '.' followed by 0 or more numbers.

EXAMPLES

isinteger("a56");
isfloat("45.65");
isfloat(".65");
isfloat("4.");
isfloat("4");
isfloat("+4..");
isfloat("+.");
isfloat(".");
isfloat("");
isinteger("");
        
return 

res=falsefalsetruetruetruetruefalsefalsefalsefalsefalse.

SEE ALSO

{{ include("includes/strings.sn") }}

AUTHOR

Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>

MODIFICATIONS

1.0 2015-03-08 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.