why was LoopParse (no space) removed?

Discuss the future of the AutoHotkey language
Helgef
Posts: 2913
Joined: 17 Jul 2016, 01:02
Contact:

Re: why was LoopParse (no space) removed?

07 Jan 2018, 13:56

Internallly, certainly LoopParse would be easier to detect compared to Loop Parse, in the sense that LoopParse doesn't need to be distinguished from Loop [Count] where the count expression starts with a variable named, eg, Parse. These examples are a bit ridiculous ofc, but still, it is not very nice,

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Having no particularly good reasons for allowing a comma here may mean this leads to removing the comma entirely, or maybe not

I prefer it without the comma, for some reason I've become unfond of initial commas :think: :)

Cheers.
User avatar
jeeswg
Posts: 4302
Joined: 19 Dec 2016, 01:58
Location: UK

Re: why was LoopParse (no space) removed?

10 Apr 2018, 18:06

- I'm preparing some core function libraries for sharing.
- Is it feasible for Loop Count, for Count to be 'can be an expression' in AHK v1? Or is there some obstacle? I.e. that parameter 1 would be 'can be an expression' when Loop has only 1 parameter. Cf. WinMove which has special handling for when exactly 2 parameters are specified.
- That way virtually all of the loops would be two-way compatible, and I could fix any parsing loops (temporarily, with a comment) to use a for loop with StrSplit for full two-way compatibility.
lexikos
Posts: 5904
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: why was LoopParse (no space) removed?

11 Apr 2018, 23:08

Count cannot be an expression for the reason noted in the documentation.
User avatar
jeeswg
Posts: 4302
Joined: 19 Dec 2016, 01:58
Location: UK

Re: why was LoopParse (no space) removed?

11 Apr 2018, 23:17

- Ah I see, the old-style File loop can also be one-parameter only.
- So I suppose for something like this to happen, it would need a directive. Thanks.

- [EDIT:] Another thing that could be helpful:

Return to “AutoHotkey v2 Development”

Who is online

Users browsing this forum: No registered users and 3 guests