Sujet : Re: else ladders practice
De : fir (at) *nospam* grunge.pl (fir)
Groupes : comp.lang.cDate : 01. Nov 2024, 14:05:01
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <6724D1FD.1070901@grunge.pl>
References : 1 2 3 4
User-Agent : Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24
Bart wrote:
In the C, you could probably do something like this:
>
#define or else if
>
if (x == a) {}
or (x == b) {}
or (x == c) {}
>
>
thsi coud have some sense if this or would be buildin keyword
(but not saying "enough" sense to do that, as writing this
logical "buildings" in code overally is not nice
overally this ilustrates the interesting difference its like
difference in
if a|b|c|d {}
and
if a {} | if b {} | if c {} | if d {}
where | means or
this means that both such ors are needed imo (but id doesnt necessary mean that building that logical constructions is good imo) (i mean there are complex way of writing code and simpel pialn ones and plain ones may be better, if there is some plain one here)