# Function Reference

# IsPtr

Checks if a variable's base type is a pointer.

IsPtr ( variable )

## Parameters

variable | The variable/expression to check.

## Return Value

Success: | 1 if the expression is a pointer type.
Failure: | 0 if expression is not pointer type.

## Remarks

See language datatypes for a detailed description.

## Related

IsArray, IsBool, IsFloat, IsHWnd, IsInt, IsMap, IsNumber, IsString, Ptr

## Example

    #include <MsgBoxConstants.au3>

    Example()

    Func Example()
        ; Run Notepad
        Run("notepad.exe")

        ; Wait 10 seconds for the Notepad window to appear.
        Local $hWnd = WinWaitActive("[CLASS:Notepad]", "")

        ; Test if $hWnd is a valid pointer and display the results.
        If IsPtr($hWnd) Then
            MsgBox($MB_SYSTEMMODAL, "", "It's a valid Ptr")
        Else
            MsgBox($MB_SYSTEMMODAL, "", "It's not a valid Ptr")
        EndIf

        ; Close the Notepad window using the handle returned by WinWaitActive.
        WinClose($hWnd)
    EndFunc   ;==>Example