Sign in to follow this  
Followers 0
BobEubanks

For..In..Next

3 posts in this topic

... This functionality is also stated in wiki under Loops, section "For Each"

In short, I cannot get this to work, with either the example listed in the wiki, or the one listed in the online help file. Listed below is the example from the help file:

;Using an Array
Dim $aArray[4]

$aArray[0]="a"
$aArray[1]=0
$aArray[2]=1.3434
$aArray[3]="test"

$string = ""
FOR $element IN $aArray
    $string = $string & $element & @CRLF
NEXT

Msgbox(0,"For..IN Arraytest","Result is: " & @CRLF & $string)

Each time you run the code in this example, the interpreter halts at:

FOR $element IN $aArray

FOR $element ^ ERROR

Is iterating over Objects and Arrays in this manner not or no longer supported?

Share this post


Link to post
Share on other sites



That example worked just fine for me....running 3.2.12.1 under SciTE

Posted Image


Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.

Share this post


Link to post
Share on other sites

Ahh.. thanks. It was the AutoIt ver I was running.. 3.1.1.0

It works now after upgrading to 3.2.12.1

Thanks!

That example worked just fine for me....running 3.2.12.1 under SciTE

Share this post


Link to post
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
Sign in to follow this  
Followers 0