Jump to content

_ArrayBinarySearch problems

Recommended Posts

Using AutoIT

I have to be doing something wrong but I just don't see it (otherwise it's a bug). :">

$aSrc has 1054 elements and $aDst has 150 elements

The following fails on the very last pass:

for $i = 0 to ubound($aSrc) - 1
    if $i = ubound($aSrc) - 1 then msgbox(0,"Result","Last entry: " & ubound($aSrc))
    $iIndex = _ArrayBinarySearch($aDst,$aSrc[$i])
    if $i = ubound($aSrc) - 1 then msgbox(0,"Result","Done")                
    if not @error then _ArrayDelete($aDst, $iIndex)

I get the Last entry MsgBox but it errors out afterwards. It never hits the DONE msg and errors out with:

C:\Program Files\AutoIt3\Include\Array.au3 (57) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:

If $avArray[$iLwrLimit]> $sKey Or $avArray[$iUprLimit] < $sKey Then


Any ideas? Edited by sshrum

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...