Jump to content

Recommended Posts

Posted

Hello :bye:, Here is the script:

#include <Array.au3>

Local $aArray[4][2] = [[1, 1], [3, 1], [5, 2], [7, 2]]

_ArrayDisplay($aArray)
_ArrayUnique($aArray)
_ArrayDisplay($aArray)

Thanks in Advance :)

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

  • Moderators
Posted (edited)

TheDcoder,

Well done - you found a bug. I have already fixed it so please do not report it.

M23

Edited by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted (edited)

Someone reported this the other day https://www.autoitscript.com/trac/autoit/ticket/3078, though wasn't able to reproduce the error with yours or theirs.

Next time please post the AutoIt version you're using, otherwise it's a lot of unnecessary checking and looking back through the svn logs.

Edited by guinness

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted (edited)

LATEST VERSION - v3.3.14.0

What version are you using?

I stand corrected, my bad. Seems it will be in the next beta.

Edited by guinness

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

I stand corrected, I am now seeing the error, which I didn't see the other day.

https://www.autoitscript.com/trac/autoit/ticket/3078 has be reopened.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

  • Moderators
Posted (edited)

TheDcoder,

Because I have written the code to fix the bug, but not yet committed it to the repository because there are a couple of other things in that library I am still testing. Reopening the ticket means that when I do commit I can link to it and it will be automatically closed and everything looks neat and tidy.

M23

Edit: Incidentally, the code you posted in the OP will not work as you think - it should read something like this:

#include <Array.au3>

Local $aArray[4][2] = [[1, 1], [3, 1], [5, 2], [7, 2]]

_ArrayDisplay($aArray)
$aUnique = _ArrayUnique($aArray, 1) ; Get unique values in column 1

_ArrayDisplay($aUnique)

You need to display the returned array - nothing happens to the original.

Edited by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted
  On 7/17/2015 at 4:05 PM, TheDcoder said:

@guinness Why did you reopen it :huh:? M23 said that he fixed it.

I can see the AutoIt Help file repository, so was aware that it hadn't been committed yet.

This is why I keep banging on about trac tickets, trac tickets, as it's a way for us (and you), to keep "track" of what has been fixed or what needs fixing. The Forum isn't really a good place for such a thing, as issues get lost in all the white noise (offtopic discussion). One mistake I made (that @Valik warned me about) was having people publish help file issues to a sub-forum, which at the time was okay as I had more time on hands. But these days it's a little hard to manage if I spends a month away from the forum for example.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

  • Moderators
Posted

TheDcoder,

  Quote

I thought that all Array UDF functions use ByRef to modify the array

Not so - read the Help file carefully when you use a function.

M23 

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

  • Moderators
Posted

TheDcoder,

[joke]

Or more likely posted a question asking why it did not.

[/joke]

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

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