[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] conditionals
From: |
Werner LEMBERG |
Subject: |
Re: [Groff] conditionals |
Date: |
Tue, 01 Jun 2010 13:47:30 +0200 (CEST) |
> What I would oh-so-love to be able to do is
>
> .if \n[EULA]=1 || \n[EULA]=3
>
> I wandered through the groff docs and didn't see any way to do that.
>
> A) Is there a way?
Yes, of course. groff uses `:' and `&' for C's `||' and `&&'
operators. This, for example, is in m.tmac:
.if (\n[N]=3):(\n[N]=5) \{\
. nr Sectp 1
. nr Ej 1
.\}
If you want spaces, you need more parentheses:
.if ((\n[N] = 3) : (\n[N] = 5)) \{\
. nr Sectp 1
. nr Ej 1
.\}
Werner
Re: [Groff] conditionals, Larry Kollar, 2010/06/01
Re: [Groff] conditionals,
Werner LEMBERG <=