groff
[Top][All Lists]
Advanced

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

Re: [Groff] how to use logical operators


From: Richard Ray
Subject: Re: [Groff] how to use logical operators
Date: Tue, 6 Apr 2010 10:11:59 -0500 (CDT)
User-agent: Alpine 2.00 (LRH 1167 2008-08-23)

On Tue, 6 Apr 2010, Werner LEMBERG wrote:

I know this is wrong
Would someone fix it

.ds a foo
.ds b bar
.
.if d a & d b \{\
\*[a] \*[b]
.\}

Richard


Solution:

.ds a foo
.ds b bar
.
.if d a \
.  if d b \{\
\*[a] \*[b]
.\}

From groff.info, section `Operators in Conditionals':

 Note that these operators [like `d'] can't be combined with other
 operators like `:' or `&'; only a leading `!' (without whitespace
 between the exclamation mark and the operator) can be used to negate
 the result.


    Werner


bummer




reply via email to

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