PDA

View Full Version : reserved characters in Set Variable



NewsArchive
04-14-2011, 12:49 AM
Way back when, I was trying to use # characters in a string, and had to
build the string on piece at a time because # is a reserved character. You
fixed this somehow, but I cannot find the thread where you told me what to
do.

So, can you tell me again?

old message was something like:

I need:
Set Variable %MyVar% to "ABC#DEF#GHI"

To do this, I have to do:
Set Variable %MyVar% to "ABC#"
Set Variable %MyVar% to "DEF#" [Append Value]
Set Variable %MyVar% to "GHI" [Append Value]

Glenn Paschal

NewsArchive
04-14-2011, 12:49 AM
Hi Glenn,

I think there was no solution. I checked the development history and found
the following (Saturday, December 12, 2009)

---

We'll document this restriction in the next build.

When setting a variable to "abc#def#ghi#jkl", the compiler assumes that
#def# and #ghi# are "text resources". Because both text resources are not
defined, the compiler (correctly) reports it as an error.

---

Argh! Unfortunately, this compiler restriction is still not documented :-(

Friedrich

NewsArchive
04-14-2011, 12:50 AM
Ah well.... Will just keep concatenating then. Thanks.

Glenn Paschal

NewsArchive
04-14-2011, 12:50 AM
Is there a way to "escape" those cases?

Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve

NewsArchive
04-14-2011, 12:50 AM
>
> Is there a way to "escape" those cases?
>

Unfortunately, no. Not at the moment.

Friedrich