# Function Reference

# IsInt

Checks if the value of a variable or expression has no fractional component.

IsInt ( variable )

## Parameters

variable | The variable/expression to check.

## Return Value

Success: | 1 - No fractional component
Failure: | 0 - Fractional component

## Remarks

The function will return 1 if the value is a float with no fractional component (e.g. 1.000).
See language datatypes for a detailed description.

## Related

IsArray, IsBinary, IsBool, IsFloat, IsHWnd, IsMap, IsNumber, IsPtr, IsString, StringIsInt, VarGetType

## Example

    #include <MsgBoxConstants.au3>

    Example()

    Func Example()
        Local $bIsInt1 = IsInt(-12345) ; Returns 1
        Local $bIsInt2 = IsInt(3.0000) ; Returns 1
        Local $bIsInt3 = IsInt(7.5 - 4.5) ; Returns 1 since it evaluates to integer 3
        Local $bIsInt4 = IsInt(4.5) ; Returns 0 as the value is a Number but not Integer.
        Local $bIsInt5 = IsInt("5432") ; Returns 0 as the value is a string.

        MsgBox($MB_SYSTEMMODAL, "", "IsInt: " & @CRLF & _
                $bIsInt1 & @CRLF & $bIsInt2 & @CRLF & $bIsInt3 & @CRLF & $bIsInt4 & @CRLF & $bIsInt5)
    EndFunc   ;==>Example