|
Cbisazza Wanderer
Joined: 27 Feb 2003 Posts: 69 Location: Australia
|
Posted: Mon Jun 28, 2004 3:28 am
Checking variable contents |
I'm running into problems using list variables that contain quotes.
Debugging of these problems is made more difficult as I know of no way of checking exactly what the contents of a variable is. Is there a way of seeing the content of a variable without any processing or parsing?
To illustrate the problem ...
#VAR test "This is a test" ;#say @test
#VAR test "This is a~" test" ;#say @test
#VAR test "This is a~" tes~"t" ;#say @test
This is a test
This is a" test
This is a test
In this case, the question I'm trying to answer is ... are the quotes actually in the variable, or are they being stripped out by the parser?
Thanks, |
|
|
|
jessew Apprentice
Joined: 03 Mar 2003 Posts: 141
|
Posted: Mon Jun 28, 2004 4:08 am |
#VAR test "This is a test" Actual Variable: This is a test
#VAR test "This is a~" test" Actual Variable: This is a" test
#VAR test "This is a~" tes~"t" Actual Variable: This is a" tes"t
The outside quotes are not in the variables but the other ones are, whats happening in your third example is they're being parsed out during the #SHOW, you could do #SHOW %quote(@test) to see this or actually look in your settings and check the real value.
Cheers |
|
|
|
Cbisazza Wanderer
Joined: 27 Feb 2003 Posts: 69 Location: Australia
|
Posted: Mon Jun 28, 2004 4:36 am |
Thanks, problem solved.
The quotes were being 'lost' when I was assigning the contents of one variable to another with
#VAR V_1 @{V_2}
Everything works fine now :)
Thanks! |
|
|
|
horks Apprentice
Joined: 20 Jul 2001 Posts: 127 Location: USA
|
Posted: Fri Jul 02, 2004 6:48 pm |
In the prefrences window, under script parser, is a check box for stripping " quotes. If this is not a feature you want, you can uncheck the box
|
|
|
|
Cbisazza Wanderer
Joined: 27 Feb 2003 Posts: 69 Location: Australia
|
Posted: Tue Jul 06, 2004 10:21 am |
Thanks, didn't know about that. It's worth looking into.
|
|
|
|
|
|