[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Groff] funny behaviour of \{
From: |
Ted Harding |
Subject: |
RE: [Groff] funny behaviour of \{ |
Date: |
Wed, 08 Mar 2000 23:07:55 -0000 (GMT) |
On 08-Mar-00 Werner LEMBERG wrote:
>
> Try the following and look at stderr:
>
> .ab\{This causes a funny error message!
>
> Is this just pathological behaviour or does it make any sense?
> What happens with UNIX troff while calling this?
If (groff 1.11) I do it as you give it above:
.ab\{This causes a funny error message!
then I get
This causes a funny error message!
If I do it with a space after .ab:
.ab \{This causes a funny error message!
then I get
\{This causes a funny error message!
In either case I'm not seeing anything that looks pathological:
The error message is clean, and in the first case (since I'm not
using compatibility mode) I guess the "\{" is treated as a separator
or an "opening quote".
In the second case, I get exactly what I expected a priori.
Is the first case the behaviour you got? If so, what seems to be
worrying about it? Or (if different) what did you get?
Interestingly, though, when I do this on a Solaris troff (very ancient,
1987 release) I get the first form of output (without the "\{" ) in
each case.
I expected the second in the second case because, as far as I know,
the use of "\{" and "\}" is mentioned in connection with beginning
and ending conditional input (according to both the 1992 ditroff
manual and the 1976 troff manual), and in no other context; and in
groff also in connection with the ".while" request (which shares
the troff ".if" syntax). So I would not expect it to be treated as a
"grouping" operator outside that context.
However, I tested the latter hypothesis using the code:
.de temp
.while \\n[.$] \{ .br
\\$1
.shift 1 \}
..
.LP
.temp \{This causes a funny error message!\}
and got:
This
causes
a
funny
error
message!
(i.e. the \{...\} did NOT group the words into a single argument;
yet both \{ and \} disappeared). This is more like the Solaris
behaviour.
So now I'm feeling a bit confused ...
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Date: 08-Mar-00 Time: 23:07:53
------------------------------ XFMail ------------------------------