Hello Jan,

On Saturday, August 24, 2002 at 10:24 GMT -0400, a witness saw Jan
Rifkinson [JR] type:

JR> Didn't realize that I had to leave a space between commands.

That's not the problem.  The problem was that you surrounded the
%SUBJ/%OSUBJ with single quotes and you were using the single quotes
as the delimiters for your %QINCLUDE.  So when you had the closing '
right next to the literal ', TB assumed (as it should) that you had
doubled the single quotes.  In TB's macro language, doubling the
delimiter is how you include a *single* instance of that character in
your string.

Confused?  Take the following example.  Suppose I want to use the
%WRAPPED macro on the following string (don't ask why, it's an
example):
Please write when you're sober.

Now, for some reason, you have/want to use single quotes as the
delimiter.  Naively, you might put the following into your template:

%WRAPPED='Please write when you're sober.'

But how should TB know where the string ends?  Does it end after "you"
or does it end after "sober."?  TB assumes after "you", which is wrong
only in this example.  To correct this, you can do two things:
1. Use a different delimiter for %WRAPPED (easier, but it ruins the
   example.)
2. Double the ' in "you're" so the line becomes:
   %WRAPPED='Please write when you''re sober.'

The second method was more necessary in the not so distant past when
you wanted to do multiple (more than two) layers of nesting of your
macros.  However, recent versions allow you to use *any* character as
a delimiter, so option 1 is easier in general.

So why was this a problem for you?  It is because TB assumed that your
%QINCLUDE='test''%OSUBJ' was one command.  TB assumed (rightly) that
your quick template name was "test'<subject>".  However weird this may
sound in this case, there are valid reasons for this type of
construction, so TB's behaviour is correct.

-- 
Thanks for writing,
 Januk Aggarwal

I have an imaginary friend who refuses to play with me.


________________________________________________
Current version is 1.61 | "Using TBUDL" information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to