Loop and For-Loop syntax alteration.

Propose new features and changes
User avatar
Delta Pythagorean
Posts: 627
Joined: 13 Feb 2017, 13:44
Location: Somewhere in the US
Contact:

Loop and For-Loop syntax alteration.

29 Sep 2017, 23:18

For-Loops and normal Loops look a bit "blocky" to me, so I'm suggesting a little syntax change to something like this. (For OTB styling I guess)
So the syntax for a For-Loop is as follows:

Code: Select all

For Index, Variable in Object_Or_Array
{
	MsgBox, % Variable " has the index: " Index
	; More actions
}
And a normal loop is as follows:

Code: Select all

Loop, %Number_Of_Times%
{
	MsgBox, % A_Index
	; More actions
}

I'm simply suggesting something similar to this:

Code: Select all

For (Index, Var, Object_Or_Array) {
	MsgBox, Some Actions related to the For-Loop
}

Loop (Times_Or_Type, Dir_Var_Other, Param3, Param4) {
	MsgBox, Something of the sort...
	MsgBox, Obviously changing the syntax and the way this entire thing works. Making it a bit more flush with the code instead of seeing brackets all on the same column.
}
I hope my point can be understood. I'm just giving suggestions, not orders.

[AHK]......: v2.0.12 | 64-bit
[OS].......: Windows 11 | 23H2 (OS Build: 22621.3296)
[GITHUB]...: github.com/DelPyth
[PAYPAL]...: paypal.me/DelPyth
[DISCORD]..: tophatcat

User avatar
KuroiLight
Posts: 327
Joined: 12 Apr 2015, 20:24
Contact:

Re: Loop and For-Loop syntax alteration.

06 Oct 2017, 22:39

You can already do for each loops in OTB style, but I agree that this should be expanded to all Loops.
Windows 10, Ryzen 1600, 16GB G.Skill DDR4, 8GB RX 480 | [MyScripts][MySublimeSettings] [Unlicense][MIT License]
01/24/18
[/color]

Return to “Wish List”

Who is online

Users browsing this forum: RaptorX and 104 guests