+ Symbol as An Argument not Getting Printed in Output

 new new list compose Reply to this message Top page
Attachments:
+ (text/plain)
+ (text/html)

Delete this message
Author: Yves Cloutier
Date:  
To: txr-users@kylheku.com
Subject: + Symbol as An Argument not Getting Printed in Output
Hi list,

I'm having a bit of trouble with getting a symbol to print.

Suppose I have a function:

> (defun size (value text) `\\*[SIZE @value]@text\\*[SIZE]`)

And call the function with -2 as an argument:

> (size -2 "some text")

I get the following output:  \*[SIZE -2]some text\*[SIZE]

However if I replace - with +, the + does not get printed:

> (size +2 "some text") => \*[SIZE 2]some text\*[SIZE]

I thought perhaps it was because the + symbol might need to be escaped, but if I use \+2, I get an error about \+2 being an unbound variable.

I could solve the problem by passing the argument as a string => "+2"

But curious as to why -2 prints without any problem while +2 does not.

Regards,

yves