c++ operator overloading

V13 v13 at priest.com
Fri Feb 25 12:06:24 EET 2005


On Friday 25 February 2005 11:07, Christos Ricudis wrote:
> Antonis Valakas wrote:
> > Ως παλιός developer, πρώην [sys|net]admin και νυν συστεμάς γενικώς, το
> >
> > μόνο που έχω να σας πω είναι ΓΡΑΦΤΕ ΣΩΣΤΟ ΚΑΙ ΠΟΙΟΤΙΚΟ ΚΩΔΙΚΑ.
>
> O swstos kai poiotikos kwdikas den exei ka8olou plaka.
>
> GIATI na grapsw
>
> switch a[5] {
>        case 1 : b=3;
>        case 2 : b=6;
>        case 3 : b=8;
>        default : b=9;
> }
>
> th stigmh poy mporw na syntaraksw sy8emela thn anousia, bareth
> pseydais8hsh asfaleias tou mikroastou programmatisth, na ton tarakounhsw
> kai na ton kanw na anarwth8ei gia thn Yparksh, na tou deiksw pws na
> niwsei thn apognwsh kai thn mataiothta ths zwhs, thn pantodynamia ths
> mh-peraths texnhs kai pneymatos panw ston fthno, peperasmeno, mataio
> ylismo, xrhsimopoiwntas to :
>
> b=(5[a]==1?3:(5[a]==2?6:(5[a]==3?6:9)));

Basika, ta dyo den einai isodynama. An theleis apla kati san to proto mporeis 
na grapseis:

b=9;

to opoio einai poio eyanagnosto...

> Christos Ricudis
<<V13>>




More information about the Linux-greek-users mailing list