IsFloat

From AutoIt Wiki

Jump to: navigation, search

Checks if an expression is a float-type. Adapted from AutoIt docs.

Contents

Syntax

$chk = IsFloat(expr)

Parameters

exprThe expression to be checked.

Return Value

Success: Returns 1.
Failure: Returns 0 if expression is not float type.

Example

IsFloat(3.14159)  ;returns 1
IsFloat(3.000)    ;returns 0 since value is integer 3
IsFloat(1/2 - 5)  ;returns 1
IsFloat(1.5e3)    ;returns 0 since 1.5e3 = 1500
IsFloat("12.345")  ;returns 0 since is a string

Related Functions

IsArray IsInt IsString IsNumber IsBool IsHWnd StringIsFloat

Personal tools