Function Reference


IsArray

Checks if a variable is an array type.

IsArray ( variable )

Parameters

variable The variable/expression to check.

Return Value

Success: Returns 1.
Failure: Returns 0 if parameter is not an array variable.

Remarks

Can be useful to validate array/non-array parameters to user-defined functions.

Related

IsFloat, IsInt, IsString, IsNumber, IsBool, IsHWnd, IsBinary, IsPtr, VarGetType

Example


Example()

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

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

    ; Retrieve the position and size of the Notepad window by passing the handle to WinGetPos.
    Local $aPos = WinGetPos($hWnd)

    ; Check if the variable is an array.
    If IsArray($aPos) Then
        MsgBox(0, "Success", "Window height: " & $aPos[3])
    Else
        MsgBox(0, "Error", "An error occurred.")
    EndIf
EndFunc   ;==>Example