Sujet : Re: else ladders practice
De : fir (at) *nospam* grunge.pl (fir)
Groupes : comp.lang.cDate : 03. Nov 2024, 14:55:46
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <fcf38e9d545ee14adfd03731dfa24b4079681b7a@i2pn2.org>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
User-Agent : Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24
fir wrote:
>bart wrote
C already has this (I've added parentheses for clarity):
>
(a ? (b ? c : -) : z)
>
This shows you haven't provided a branch for b being false.
>
>
coz ypu dont need to provide such branch
in c yu need to put that ":" each time? (if so some error was discovered
as it ould be better to not oblige its existence)
ye i checked and it seems you cant
x ? printf("aa");
you must write
x ? printf("aa"):0;
this also go
x ?: printf("bbb");
thsi is a mistake as "?" should go and ":" optionally