the ++ operator
Ioannis Papaioannou
jhn at aix.meng.auth.gr
Fri Nov 21 18:49:20 EET 2003
George Ar. Al. Antikatzidis wrote:
> Ioannis Papaioannou wrote:
>
>> antistoixei me poio apo ta parakatw:
>> 1) c = a[0] + b[1] + a[0] + b[0];
>> 2) c = a[0] + b[1] + a[1] + b[1];
>> 3) c = a[1] + b[1] + a[0] + b[0];
>> 4) c = a[1] + b[1] + a[1] + b[1];
>>
> kanena apo ta parapanw alla me to :
> 5) c = a[0] + b[0] + a[1] + b[1];
nai, apo biasynh ebala to b[i] na einai b[1] enw einai to mono sigouro
oti 8a einai b[0].
giati ta ypoloipa 3 expressions se authn thn grammh den orizetai apo
kanena standard to ti i 8a exoun. Mporei o compiler kanei panta tis
pros8eseis apo aristera pros de3ia oxi omws aparaithta fetch thn timh
apo ka8e entity.
px. an o compiler apofasisei
c = a[0] + b[0] + a[0] + b[1];
paramenei ansi c compatible.
ena kalytero paradeigma 8a htan:
c = (a[i] + b[i++]) + (a[i] + b[i]);
^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
expr1 expr2
poio expr 8a apofasisei o compiler na ypologisei prwta? sigoura oles oi
pra3eis 8a ginoun apo aristera pros ta de3ia, omws oxi aparaithta kai to
ka8e expr.
--
JHN
More information about the Linux-greek-users
mailing list