Sujet : Re: Command Languages Versus Programming Languages
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.unix.shell comp.unix.programmer comp.lang.miscDate : 06. Apr 2024, 00:11:54
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <uuq0fp$1lcgf$2@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
User-Agent : Pan/0.155 (Kherson; fc5a80b8)
On Fri, 5 Apr 2024 09:17:37 -0000 (UTC), Muttley wrote:
On Thu, 4 Apr 2024 23:29:21 -0000 (UTC) Lawrence D'Oliveiro
<ldo@nz.invalid> wrote:
>
This is where indentation helps. E.g.
>
a =
b ?
c ? d : e
: f ?
g ? h : i
: j;
Just use brackets. Saves a lot of pain.
a=(b?(c?d:e):(f?(g?h:i):j));
The improvement speaks for itself.