gia na anapsoyn ligo ta aimata :-)

Giorgos Keramidas keramida at ceid.upatras.gr
Wed Nov 9 08:47:13 EET 2005


On 2005-11-08 22:30, Giorgos Keramidas <keramida at ceid.upatras.gr> wrote:
> On 2005-11-09 04:05, Fotis Georgatos <gef at ceid.upatras.gr> wrote:
> > #define TESTNUM1 -(1<<31)
> > #define TESTNUM2 -2147483648
> >
> > int main (void)
> > {
> >   if ( TESTNUM1 == TESTNUM2 )
> >     printf("The numbers are equal: %d %d\n", TESTNUM1, TESTNUM2 );
> >   if ( 0 < TESTNUM1 )
> >     printf("Your lucky number TESTNUM1 is positive: %d\n", TESTNUM1 );
> >   if ( 0 < TESTNUM2 )
> >     printf("Your lucky number TESTNUM2 is positive: %d\n", TESTNUM2 );
> >   return 0;
> > }
>
> Kai gia na xontrynei ligo to paixnidi...
>
> Opoios brei kai giati ayto to programma tupwnei diaforetika
> apotelesmata se i386, sparcv9 kai amd64 mhxanhna, kai grapsei sth
> lista akribws giati blepei ayta poy blepei se kathe mhxanhma,
> kerdizei kerasma apo mena, pou 8a to steilw me dika mou eksoda
> spiti tou.

A, epishs, kalo einai na ginei dokimh tou programmatos me 2
diaforetikoys tropoys:

        % gcc -std=c89 koko.c
        % gcc -std=c99 koko.c

Poia einai h diafora, kai giati yparxei diafora se aytes tis dyo
periptwseis?

- Giorgos




More information about the Linux-greek-users mailing list