Can anybody explain the last part of this quote ("In other words..."). I don't understand which problems we are trying to "work around". And my attemts to use something like (%MyVar%) doesn't gave me any good results.Known limitation: For backward compatibility and ease-of-use, the following two examples are functionally identical:
* return MyVar
* return %MyVar%
In other words, a single variable enclosed in percent signs is treated as a non-expression. To work around this, make it unambiguously an expression by enclosing it in parentheses; for example: return (%MyVar%).
Code: Select all
Test() {
Var := "Foo"
; return Var - returns "Foo"
; return %Var% - the same
; return (%Var%) - returns empty string. Doesn't make sense for me
return (%Var%)
}
MsgBox, % Test()