Code: Select all
i := 4
For, % i
{
Msgbox, % i
}
Code: Select all
i := 4
For, % i
{
Msgbox, % i
}
eh:SSpeed wrote:I sorta feel like this should exist, what do you think?Code: Select all
i := 4 For, % i { Msgbox, % i }
Code: Select all
i := 4
Loop, % i
{
Msgbox, % A_Index
}
Code: Select all
i := 4
For, i
{ ; i := 1, i := 2, i := 3, i := 4,
Msgbox, % i
}
Code: Select all
i := 4
iG := [7,8,9]
For, i in iG
{ ; i := 7, i := 8, i := 9,
Msgbox, % i
}
We could remove all other loops while making things more dynamic with range().kczx3 wrote:Based on your first code sample there, it seems like you want a Range like in Python, which others have requested before. I don't see its benefit.
Your second code sample is already a supported feature of the language. I'm not sure why you'd define i before the loop unless its used for something else. The comma after the word "For" can also be omitted.
I do prefer the for k, v in x syntax over the loop syntax, even though its more typing. Suppose that's enough to change my mind about Range().nnnik wrote:We could remove all other loops while making things more dynamic with range().
Users browsing this forum: No registered users and 88 guests