[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] strange if "..."..." behaviour
From: |
Larry Jones |
Subject: |
Re: [Groff] strange if "..."..." behaviour |
Date: |
Mon, 2 Oct 2000 10:37:22 -0400 (EDT) |
Werner LEMBERG writes:
>
> .ds xx \fR|\fP
> .ie "|"\*(xx" \
> . tm true
> .el \
> . tm false
>
> Would you expect that the result is `true'? I didn't.
Yes.
> The original troff manual says:
>
> ... if the strings compare identically (including motions and
> character size and font), _anything_ is accepted as input ...
>
> I would interpret this that the comparison is done by a simple
> strcmp(), and not interpreting the strings. Can someone please check
> this with an original AT&T troff?
No, what it's saying is that the resulting motions, character sizes, and
fonts have to match, not that the individual motion, size and font
requests have to match. In this case ``|'' and ``\fR|\fP'' both result
in a roman ``|'' character with the same point size and at the same
location on the page, so the strings are equal. If you added a ``.ft
I'' before the ``.ie'', then it's false because ``|'' produces an italic
``|'' rather than a roman one. AT&T troff works exactly the same way.
-Larry Jones
Any game without push-ups, hits, burns or noogies is a sissy game. -- Calvin