Replace escaped characters with % syntax

Share your ideas as to how the documentation can be improved.
iseahound
Posts: 552
Joined: 13 Aug 2016, 21:04
GitHub: iseahound

Replace escaped characters with % syntax

06 May 2020, 20:38

Replace Loop Parse, string , `; with Loop Parse, string , % ";"
User avatar
Ragnar
Posts: 309
Joined: 30 Sep 2013, 15:25

Re: Replace escaped characters with % syntax

07 May 2020, 00:14

Neither can I find the first string anywhere in the docs, nor do I see the need since both are valid syntax.
iseahound
Posts: 552
Joined: 13 Aug 2016, 21:04
GitHub: iseahound

Re: Replace escaped characters with % syntax

07 May 2020, 12:55

Explain why in Example 4 of the Loop parse page

Code: Select all

Loop, Parse, Colors, `,|;
is a valid construction to an AutoHotkey newbie. Too add to the confusion,

Code: Select all

Loop, Parse, Colors, ;
is not. whereas

Code: Select all

Loop, Parse, Colors, `,`n
is.
User avatar
boiler
Posts: 5295
Joined: 21 Dec 2014, 02:44

Re: Replace escaped characters with % syntax

07 May 2020, 14:04

iseahound wrote: Explain why in Example 4 of the Loop parse page

Code: Select all

Loop, Parse, Colors, `,|;
is a valid construction to an AutoHotkey newbie.
I would say, "If the comma weren't escaped, it would be the separator between parameters." I think they would get that pretty quickly.
iseahound wrote: Too add to the confusion,

Code: Select all

Loop, Parse, Colors, ;
is not. whereas

Code: Select all

Loop, Parse, Colors, `,`n
is.
These all have good reasons why they are true, as I'm sure you know (space followed by ; indicates a comment, and a comma is a parameter separator).

It sounds like you are not asking for a change to the language itself, so you would prefer that the documentation didn't show escaping characters at all?
swagfag
Posts: 3773
Joined: 11 Jan 2017, 17:59

Re: Replace escaped characters with % syntax

07 May 2020, 14:16

im, too, for revamping the docs to demo only current, best practices

the only argument u can make for keeping the legacy examples around is "theres a lot of legacy code out there".
what can be done is introduce "Expression | Legacy(NOT RECOMMENDED)" tabs to codeboxes hosting revamped examples. that way u get to avoid outright having to delete them
User avatar
nnnik
Posts: 4461
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: Replace escaped characters with % syntax

11 May 2020, 08:27

We could have clickable little boxes that hide the ugly code but people can view if they really see the need to.
Recommends AHK Studio
iseahound
Posts: 552
Joined: 13 Aug 2016, 21:04
GitHub: iseahound

Re: Replace escaped characters with % syntax

11 May 2020, 12:05

Using % "," is about 5% faster than `, too.

Return to “Suggestions on documentation improvements”

Who is online

Users browsing this forum: No registered users and 1 guest