IsNumber

From AutoIt Wiki

Jump to: navigation, search

Checks if a variable's base type is numeric. Adapted from AutoIt docs.

Contents

Syntax

$chk = IsNumber(var)

Parameters

varThe variable to check.

Return Value

Success: Returns 1.
Failure: returns 0 if expression is not numeric.

Example

$x = IsNumber(42) ; returns 1

Remarks

Variants can be of two base types: string and numbers. Additionally, numbers may be integers (whole) or fractional.

Related Functions

IsArray IsFloat IsInt IsString IsBool IsHWnd

Personal tools