Quote:
I never knew "initializers" were so special...
Static initializers are "special" because they must take effect only once, before the script begins executing. Local and global initializers are ordinary expressions, which is why they "require quotes only if you're assigning a literal string" (as I said earlier).
An advantage of the way continuation sections work with expressions:
Code:
x := 2.468
MsgBox % "
(
Input: " x "
Round: " Round(x) "
Ceil: " Ceil(x) "
Floor: " Floor(x)
)
Notice that the continuation section inserts literal newline characters into the expression. (Specifying
(Joindelimiter changes this.)
Quote:
merge this as a non-expression, passing it to the expression as a properly quoted string/whatever
I think that's a good idea (for optional behaviour). At its simplest, it would replace " with "" and put " at either end. But what about %vars% (which wouldn't be supported for static initializers anyway)?
Perhaps an option like:
Code:
static var =
("
First line.
Second line.
)
However, it might be confusing given the current ways:
Code:
static var1 = "
(
First line.
Second line.
)"
static var2 =
(
"First line.
Second line."
)
Maybe Q or Quote or QuotedString would be clearer. Then again, I suppose there's no ambiguity with:
Code:
static var =
"
First line.
Second line.
"
I think that would improve readability for function-calls containing continuation sections, like:
Code:
LV_Add("",
"
First line of text.
Second line of text.
")
vs
Code:
LV_Add("",
(
"First line of text.
Second line of text."
))