Modify

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: 3.3.13.7 Component: Standard UDFs
Version: 3.3.12.0 Severity: None
Keywords: Cc:

Description

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

#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 3.3.13.7
  • Owner set to guinness
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [10397] in version: 3.3.13.7

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

Action
as closed The owner will remain guinness.
Author


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

 
Note: See TracTickets for help on using tickets.