#157589 - 2006-02-22 01:12 AM
SetOption("NoEnvVarsInStrings","On")
|
It_took_my_meds
Hey THIS is FUN
   
Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
|
Hi All, We currently have the ability to turn off the resolution of macros and variables in strings, but not environmental variables. I know it is not often a problem but when you do a lot of work with SQL like clauses, it can cause some headaches. It is by no means a big deal, but I believe this should be easy to do and would complete the disabling of resolution in strings. Cheers, Richard
ps. Please enable stdout and COM events!
Edited by It_took_my_meds (2006-02-22 06:45 AM)
|
Top
|
|
|
|
#157591 - 2006-02-22 06:31 AM
Re: SetOption("NoEnvVarsInStrings","On")
|
It_took_my_meds
Hey THIS is FUN
   
Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
|
That's actually not true. Try:
Code:
? "Without a double %%: %test%" ? "With a double %%: %%test%%" get $
It evaluates it to nothing... When you are passing sql commands through an execute function, the headaches start to occur.
Richard
|
Top
|
|
|
|
#157592 - 2006-02-23 10:22 AM
Re: SetOption("NoEnvVarsInStrings","On")
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
That is a pain. It used to work in the way that Doc suggested, where only environment variables with values got expanded.
To get over the problem in the short term, specify the percent symbols individually, or use a short function: Code:
"String with 'LIKE' pattern match: "+udfLikeVar("TEST")+@CRLF Function udfLikeVar($s) $udfLikeVar=Chr(37)+$s+Chr(37) EndFunction
|
Top
|
|
|
|
Moderator: Lonkero, ShaneEP, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart
|
0 registered
and 587 anonymous users online.
|
|
|