Opened 10 years ago

Closed 10 years ago

#2803 closed Bug (Fixed)

_ArrayMaxIndex _ArrayMinIndex @error on single element array

Reported by: ResNullius Owned by: guinness
Milestone: Component: Standard UDFs
Version: Severity: None
Keywords: Cc:


_ArrayMax & _ArrayMin returning empty result on an array with only one element. Traced problem to _ArrayMaxIndex & _ArrayMinIndex. Production Version: & latest beta

#include <Array.au3>
Dim $aArray[1]=[5]

$iMaxIndex = _ArrayMaxIndex($aArray)
MsgBox(4096,"MaxIndex", "$iMaxIndex = " & $iMaxIndex & @CRLF & @CRLF  & "Error = " & @error & @CRLF & @CRLF)

$iMinIndex = _ArrayMinIndex($aArray)
MsgBox(4096,"MinIndex", "$iMaxIndex = " & $iMinIndex & @CRLF & @CRLF  & "Error = " & @error & @CRLF & @CRLF)

;offending lines in _ArrayMaxIndex() & _ArrayMinIndex() functions
;Local $iDim_1 = UBound($avArray, $UBOUND_ROWS) - 1
;If $iDim_1 < 0 Then Return SetError(5, 0, -1)

Attachments (0)

Change History (1)

comment:1 Changed 10 years ago by guinness

  • Milestone set to
  • Owner set to guinness
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [10397] in version:

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The owner will remain guinness.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.