What I want is..
{dlgchoose|Plus or Minus?|Plus=++Minus=-}
..but of course every + is interpreted as a separator. Is there a way of escaping the first + sign?
Regards, AB
What I want is..
{dlgchoose|Plus or Minus?|Plus=++Minus=-}
..but of course every + is interpreted as a separator. Is there a way of escaping the first + sign?
Regards, AB
You can put quotes around the values, but the problem is that you then get the quotes inserted into the command as well. 
{dlgchoose|Plus or Minus?|Plus="+"+Minus="-"}
i.e. That will return "+" or "-" with the quotes.
Not sure if there is a way to do it without the quotes.
You could use something like this:@set strTest = Plus=+Minus=-
{dlgchoose|Plus or Minus?|{$strTest}}
[quote="steve"]You could use something like this:@set strTest = Plus=+Minus=-
{dlgchoose|Plus or Minus?|{$strTest}}
[/quote]
This works for Minus (returns -) but not for Plus (returns Plus).
Regards, AB
What are you doing with the results of the dlgchoose ?
I'm building a parameter string to pass to an external program. The string needs to include a plus or minus sign. I have tested enclosing the finished parameter string in quotes and it works, so I have a way of bypassing the problem using the method Leo proposed. This is obviously not a common problem, but it would be nice to have a way of escaping the + symbol. One way would be a control code that lets the user define the separator as something other than + (the default).
@stringsep = ;
An alternative approach would be to add support for a @skip [n] control code which could be used to implement a simple if construct by ignoring "n" command lines like so:
@set plusminus = -
@set n = {dlgchoose|Plus or Minus?|Plus=0+Minus=1}
@skip {$n}
@set plusminus = +
@set string = some text {$plusminus} some more text
Regards, AB