[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Conditional problem: "!" operator after "&"

From: Werner LEMBERG
Subject: Re: [Groff] Conditional problem: "!" operator after "&"
Date: Wed, 28 Jul 2010 16:37:56 +0200 (CEST)

>      5  .if \n[NCS]&!\n[SIP] .nop NCS only.
> test.t:5: warning: numeric expression expected (got `!')

I suspect that for backwards compatibility with AT&T troff only a
`leading' exclamation mark – this is, at the very beginning of an
expression within `.if', `.ie', or `.while' – is allowed.  You have to
split up the compound expressions into simpler ones, see below.

Can you suggest a fix to groff.texinfo to document this better?



.nr NCS 0
.nr SIP 1
This is a test,
.if \n[NCS] \
.  if !\n[SIP] \
.    tm NCS only.
.if !\n[NCS] \
.  if \n[SIP] \
.    tm SIP only.
.if \n[NCS] \
.  if \n[SIP] \
.    tm NCS and SIP.
.if !\n[NCS] \
.  if !\n[SIP] \
.    tm actually it isn't because nothing is defined!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]