It adds complexity because the user could choose characters that are legal in variable names. Still, if the paren approach adopted, maybe it can be allowed "at own risk" if it doesn't add to much overhead.
With everything above, I also still think the "(" and the ")" should still be configurable via a processing directive "#" at the start.
...if someone wants to cause problems by picking dumb chars, let em, just have it spew errors at them or you could define safe chars & let em pick any subset of those. My comment is only about being able to use directives to configure things, I still don't generally like the paren idea.
Thanks to everyone for all these ideas. I think the parameter-based idea has considerable advantages over the simple merge-these-lines-with-the-above-line idea. So if it's not too much more complex (both for usability and code complexity), it should probably be done that way.
...do you mean my begin/end param method or his () or (qwerty) method?
Feel free to post more replies if you have the time and interest. For example, I still would like to see it support modes such as the following:
1) each linebreak becomes `n, `r`n, a space, or nothing at all (i.e. straight concatenate)
2) whether leading whitespace should be ignored in each line of continuation text.
...both of my ideas support a flags param, the << method (that don't seem like it's going to happen) supported <<% to have it parse vars, it could be expanded to <<`n to do line breaks or <<%`n to do both. Basically it's just a flags section, that can be expanded to have any flags to do anything. Ditto for my begin/end method, one syntax has the flags before the word begin...%begin...the other has it after...begin%. This flags section is supposed to be the same expandable section as the other one...begin`n...begin%`n
Parse for vars
`n or `r`n___l
Make line breaks be `n or `r`n
Make line breaks be a space
Strip line breaks
Strip leading whitespace
Make line breaks be chars
No number or flags, preserve all
Any number, no flags, preserve all
Any number, % flag, parse for vars
No number, s flag, change line breaks to spaces
Any number, s flag, change line breaks to spaces
No number, S flag, strip line breaks
No number, [chars
] flag, change line breaks to chars
, in this case 123...default with no flags, my idea is supposed to preserve everything, because mine isn't a line continuation method, it's an "include arbitrary text here" method, that text being included without any changes.
I was just thinking of how my begin/end would deal with an ahk script writing an ahk script, that had begin/end tags in it & it would be fine, because the number don't have to be in order, you can use any number, so if the script you're including uses end1 thru end9 just use end12345 & it's unique. You can also use just plain begin/end throughout your script, because the number only comes into play when nesting, so you wouldn't need to think of an unused number each time you do a begin/end.
Going back to the subject of being able to use directives to control things, if you do the begin/end method, you should include the #BeginFormat/#EndFormat directives, then people can use other words besides begin/end & pick where they want the number & flag params. If someone picks a dumb format here, let it be their problem, don't sacrifice configurability for the few who would be dumb with it.