Jump to content

Why _ArrayFindAll does not working for strings


Recommended Posts

Why this is not working for strings....

#include <Array.au3>
Local $avArray[9] = [0, 1, 2, 1, "TEST",3,4,77, "TEST"]
Local $aiResult = _ArrayFindAll($avArray, "TEST")
_ArrayDisplay($avArray, "$avArray")
_ArrayDisplay($aiResult, UBound($aiResult) -1)

Be Green Now or Never (BGNN)!

Link to comment
Share on other sites

#include <Array.au3>
Local $avArray[9] = [0, 1, 2, 1, "TEST",3,4,77, "TEST"]
Local $aiResult = _ArrayFindAll($avArray, "TEST")
_ArrayDisplay($avArray, $avArray);edit here
_ArrayDisplay($aiResult, UBound($aiResult) -1)

Edited by d4rk

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Link to comment
Share on other sites

Why this is not working for strings....

#include <Array.au3>
Local $avArray[9] = [0, 1, 2, 1, "TEST",3,4,77, "TEST"]
Local $aiResult = _ArrayFindAll($avArray, "TEST")
_ArrayDisplay($avArray, "$avArray")
_ArrayDisplay($aiResult, UBound($aiResult) -1)

Well, my mistake it is working for me. Thanks!

Be Green Now or Never (BGNN)!

Link to comment
Share on other sites

_ArrayDisplay($avArray, $avArray);edit here
Don't post answers if you're not sure or won't test first. You can't give an array as the title in _ArrayDisplay(). The name of the array being displayed inside quotes was an appropriate title string, your "fix" is wrong.

There was nothing wrong with the code in the OP.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...