Quote:

Richard -- I guess I've never had a problem using vars in strings before which is why I don't see why everyone is so against it.




Aye, and there's the rub.

It's fine while it works - when it doesn't work its a real problem and it may take you a while to discover why your previously well behaved program has stopped working.

You don't need to set NoVarsInStrings. Just don't use vars in strings.

It's just bad coding practice. It doesn't mean your code won't work just as well as code which doesn't have vars in strings. However you are more likely to encounter a situation where it will fail, and even worse is that you are less likely to know about it.

You're probably fed up with examples by now, but here is a good example of code not working as you'd expect:
Code:
If "$VAR" = "" "Variable $$VAR is not set " ? Else "Variable $$VAR is set" ? EndIf
If $VAR = "" "Variable $$VAR is not set " ? Else "Variable $$VAR is set" ? EndIf



The two conditionals are identical, except one has the variable in a string.

The output from this is:
Code:
Variable $VAR is set
Variable $VAR is not set



Now, that first result can't possibly be what the coder intended, can it?