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: Werner LEMBERG
Subject: Re: [Groff] how to use logical operators
Date: Tue, 06 Apr 2010 16:32:40 +0200 (CEST)

> 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




reply via email to

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