Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1842 closed Bug (Duplicate)

_ArrayUnique does not work properly

Reported by: anonymous Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:


; *
; Example 1 - Declare a 1-dimensional array, that contains duplicate values.
; Use _ArrayUnique to Create a New Array that only contains the unique values.
; *
#include <Array.au3>
Dim $aArray[10] = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5]
_ArrayDisplay($aArray, "$aArray")
$aNewArray = _ArrayUnique($aArray) ;Using Default Parameters
_ArrayDisplay($aNewArray, "$aNewArray represents the 1st Dimension of $aArray")

Attachments (0)

Change History (4)

comment:1 Changed 12 years ago by mvg

Duplicate of ticket #1806. (No bug)

_ArrayUnique() Doc on $iBase parameter say's

$iBase [optional] Is the Array 0-base or 1-base index. 0-base by default

This is for telling the function about the input array. And it not used/intended to control the format of the output array.

As stated in the Remark part of the _ArrayUnique() help.

Returns an array, the first element ($array[0]) contains the number of strings returned, the remaining elements ($array[1], $array[2], etc.) contain the unique strings.

Still no bug.
Only thing left is to put in a Request for a change, and elaborate on the why.

  • - -

?: maybe making the help text on the $iBase parameter more specific by adding "input" to it,

$iBase [optional] Is the input Array 0-base or 1-base index. 0-base by default

comment:2 Changed 12 years ago by Jpm

  • Resolution set to Duplicate
  • Status changed from new to closed

comment:3 Changed 12 years ago by Thopaga

Have I misunderstood?
Look at the result I get.
There is a duplicate row with value 5.


comment:4 Changed 12 years ago by Thopaga

Dear Sir.
Sorry, that I did not understand.
No error, only my misunderstanding (not english speaking though).
Thanks for clearing up.
Regards Thopaga.

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 ticket will remain with no owner.

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

Note: See TracTickets for help on using tickets.