Jump to content



Recommended Posts

Func _ArrayDeleteRow(ByRef $avArray, $iElement)
    Local $iR = 0, $iC = 0, $iRows = 0, $iCols = 0
    If (Not IsArray($avArray)) Then
        SetError(1); not an array
        Return ""
    Local $iRows = UBound($avArray); Row count
    Local $iCols = UBound($avArray, 2) ; Column count
    If $iRows = 1 Then
        SetError(2); 1 row
        Return ""
    If $iElement < 0 or $iElement > ($iRows - 1) Then
        seterror(3); out of row bounds
        Return ""
    Local $avNewArray[$iRows - 1][$iCols]
    for $iR = 0 to $iRows - 2
        if $iR = $iElement then ContinueLoop
        for $iC = 0 to $iCols - 1
            $avNewArray[$iR][$iC] = $avArray[$iR][$iC]
    $avArray = $avNewArray
    Return 1
EndFunc  ;==>_ArrayDeleteRow

Sean Shrum :: http://www.shrum.net

All my published AU3-based apps and utilities

'Make it idiot-proof, and someone will make a better idiot'


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...