[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] condition: OR of two string comparisons
From: |
Ralph Corderoy |
Subject: |
Re: [Groff] condition: OR of two string comparisons |
Date: |
Mon, 17 Nov 2014 16:36:54 +0000 |
Hi Werner,
> > Would it? That form could reject backwards compatibility; only new
> > format allowed, just as after .iff. I don't see why old syntax has
> > to be handled if it currently makes no sense to use `E' after the
> > `('.
>
> Well, using (E;...) everywhere is tedious.
True. Denis has a point though, it would be nice to use new syntax for
things like `.nr'.
> Maybe it makes more sense to have the slightly more verbose
>
> .iff
> .then
> .else
>
> so that we can avoid excessive parentheses – the `.then' keyword would
> be the sentinel to stop the conditional expression. Alternatively, we
> could mandate to always use braces:
>
> .iff ... \{\
> .\}
> .else \{\
> .\}
I'd favour mandatory braces and no parenthesis around the condition.
Must we keep the cluttered `\{\' with the new syntax? What if the open
brace indicated multi-line format and the else/elsif has to be on the
closing `.}' line?
.iff ... {
foo\c
.}
.iff ... {
foo\c
.} else {
bar\c
.}
.iff ... {
foo\c
.} elsif ... {
bar\c
.} else {
xyzzy\c
.}
Could a single-line .iff give new syntax for the brief else/elsif-less
case? Leading spaces after the colon would be swallowed, as with
existing `.if'.
.iff ...: foo\c
Cheers, Ralph.
- Re: [Groff] condition: OR of two string comparisons, (continued)
- Re: [Groff] condition: OR of two string comparisons, Werner LEMBERG, 2014/11/15
- Re: [Groff] condition: OR of two string comparisons, Ralph Corderoy, 2014/11/15
- Re: [Groff] condition: OR of two string comparisons, Steffen Nurpmeso, 2014/11/15
- Re: [Groff] condition: OR of two string comparisons, Carsten Kunze, 2014/11/15
- Re: [Groff] condition: OR of two string comparisons, hohe72, 2014/11/15
- Re: [Groff] condition: OR of two string comparisons, Werner LEMBERG, 2014/11/15
- Re: [Groff] condition: OR of two string comparisons, Ralph Corderoy, 2014/11/16
- Re: [Groff] condition: OR of two string comparisons, Werner LEMBERG, 2014/11/17
- Re: [Groff] condition: OR of two string comparisons, Denis M. Wilson, 2014/11/17
- Re: [Groff] condition: OR of two string comparisons, Werner LEMBERG, 2014/11/19
- Re: [Groff] condition: OR of two string comparisons,
Ralph Corderoy <=
- Re: [Groff] condition: OR of two string comparisons, Werner LEMBERG, 2014/11/17
- Re: [Groff] condition: OR of two string comparisons, hohe72, 2014/11/15
- Re: [Groff] condition: OR of two string comparisons, Tadziu Hoffmann, 2014/11/16
- Re: [Groff] condition: OR of two string comparisons, James K. Lowden, 2014/11/16
- Re: [Groff] condition: OR of two string comparisons, Tadziu Hoffmann, 2014/11/17
- Re: [Groff] condition: OR of two string comparisons, Carsten Kunze, 2014/11/17
- Re: [Groff] condition: OR of two string comparisons, hohe72, 2014/11/18
- Re: [Groff] condition: OR of two string comparisons, Carsten Kunze, 2014/11/18
- Re: [Groff] condition: OR of two string comparisons, hohe72, 2014/11/18
- Re: [Groff] condition: OR of two string comparisons, Ted Harding, 2014/11/23