groff
[Top][All Lists]
Advanced

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

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


From: Ralph Corderoy
Subject: Re: [Groff] Conditional problem: "!" operator after "&"
Date: Thu, 29 Jul 2010 11:58:20 +0100

Hi,

> +Attempting to insert the @samp{!} operator
> +within the expression results in a
> address@hidden expression expected} warning.  This
> +maintains bug-compatibility
> +with old versions of @code{troff}.

It is not a bug that it works that way in troff.

> address@hidden
> +.nr X 1
> +.nr Y 0
> +.\" This does not work as expected
> +.if (\n[X])&(!\n[Y]) .nop X only
> +.
> +.\" Use this construct instead
> +.if (\n[X]=1)&(\n[Y]=0) .nop X only
> address@hidden

Perhaps this can have values other than 1 for X and use Tadziu's (1-\nX)
with an explanation of why.

> +This maintains bug-compatibility with AT&T
> +.IR troff .

Ditto.

Cheers,
Ralph.




reply via email to

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