J
Jerald Fijerald
Hi all.
I was wondering if this expression is ok and has not any undefined
behaviors (bad style is not an issue):
int x;
x = a > 0 ? a [i++] : 1000;
I believe it is ok because in the case
x ? i++ : 0;
'i' is not incremented if x==0.
So it is ok, yes?
Thanks,
Gerald.
I was wondering if this expression is ok and has not any undefined
behaviors (bad style is not an issue):
int x;
x = a > 0 ? a [i++] : 1000;
I believe it is ok because in the case
x ? i++ : 0;
'i' is not incremented if x==0.
So it is ok, yes?
Thanks,
Gerald.