Opened 13 years ago

Closed 13 years ago

#1921 closed Bug (Wont Fix)


Reported by: BrewManNH Owned by:
Milestone: Component: Documentation
Version: Severity: None
Keywords: Cc:


It states in the help file that _ArrayUnique "Returns the Unique Elements of a 1-dimensional array.", fundamentally this is incorrect. What _ArrayUnique does is it returns a 1-dimensional array, while the incoming array can be multi-dimensioned. If you use the $iDimension parameter you can tell it to only return the unique items on whichever column you'd like.

See the example below, it will return the unique items from the 3rd column (first column is 1 when using _ArrayUnique)

#include <Array.au3>
Local $Array[4][6] = [["FirstName", "LastName", "IDNumber", "Location", "Grade", "Action"],["john", "smith", "111222", "Denver", "2", "enroll"],["jack", "jones", "333444", "denver", "4", "withdraw"],["jack", "jones", "333444", "lasvegas", "4", "enroll"]]
$Array = _ArrayUnique($Array, 3)

It would be nice if the documentation could be changed to reflect the true usage of the function.

Attachments (0)

Change History (2)

comment:1 Changed 13 years ago by mvg

"Returns the Unique Elements of a 1-dimensional array."

Not to mention the fact that is not returning "the Unique elements", but returning a version of the input with the duplicates removed. ("make elements unique" versus "give unique elements from set")

$aArray = [1,2,3,4,5,1,2,3,4,5]  [Array|10]
$aNewArray = [5,"1","2","3","4","5"]  [Array|6]


Oh yea, real reason.

$iDimension [[optional] The Dimension of the Array to use

1 - double "[" character typo.
2 - dimension?, Field/Column (or Row?, I'm never sure about those.) sound more appropriate.

comment:2 Changed 13 years ago by Jon

  • Resolution set to Wont Fix
  • Status changed from new to closed

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.