Jump to content

changing a variable with a for loop


Hawkwing
 Share

Recommended Posts

If I wanted to have a for loop like so:

for $i = $x to $y
next

and I wanted $x always be equal to $i, would I have to add $x = $i or would this work?

$i = $x
for $i = $i to $y
next
Edited by Hawkwing

The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Link to comment
Share on other sites

Well, I'm not actually writing a code. I don't have access to a computer with autoit right now, and I was just wondering if there was some sort of ByRef thing for a for loop.

The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Link to comment
Share on other sites

$y=10

For $x=$0 to $y

MsgBox(4096,"",$x&","&$i)

Next

Why dont just use code like this?

What's $0, my friend?? And where did $i come from suddenly in Msgbox?

Edited by Manjish
[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
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...