Sujet : Re: on allowing "int a" definition everywhere
De : ben (at) *nospam* bsb.me.uk (Ben Bacarisse)
Groupes : comp.lang.cDate : 28. Aug 2024, 15:28:14
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <87y14gyb5t.fsf@bsb.me.uk>
References : 1 2 3 4 5 6 7
User-Agent : Gnus/5.13 (Gnus v5.13)
Keith Thompson <Keith.S.Thompson+
u@gmail.com> writes:
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
[...]
Not exactly. There are things that can be done inside a
statement-expression that are not available inside nested
functions or lambdas.
>
And you're not going to tell us what those things are.
Apparently not.
But one thing occurs to me... you can break (or jump) out of a statement
expression:
for (int i = 0; i < 10; i++)
printf("%d\n", ({ if (i > 5) break; i; }));
You can't do this with a lambda or nested function.
-- Ben.