|
Zafrusteria Wanderer
Joined: 11 Oct 2000 Posts: 94 Location: United Kingdom
|
Posted: Sun Jul 27, 2003 12:11 pm
why is this a syntax error? |
Why is this a syntax error
#if (@test =~ @lookfor) { ......}
When this is not
#if (@test =~ "%2") { ......}
Did I miss something in the help file? |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sun Jul 27, 2003 5:29 pm |
The syntax checker probably wants one of them to be in double quotes. If it works, then you can ignore the syntax error. If it bothers you, then you can enclose the second one in double quotes since variable references are expanded inside of patterns.
|
|
|
|
Zafrusteria Wanderer
Joined: 11 Oct 2000 Posts: 94 Location: United Kingdom
|
Posted: Mon Jul 28, 2003 6:26 pm |
ah ok, can Zugg put this on his list of syntax highlighter bugs.
and while playing around with this I also found this one put both in quotes and it's always false.
#var test string
#var lookfor @test
#if ("@test" =~ "@lookfor") {#sh should be true} {#sh but always false}
#if (@test =~ @lookfor) {#sh correct but highlighter bug} {#sh and not this one}
#if (@test =~ "@lookfor") {#sh correct} {#sh never true} |
|
|
|
|
|