I can see I'm a litle late on this. I got the ";" bit right as I do this
once a day myself. That bit on trigraphs is nasty tho. Why is this stuff
still around ? :S
Regards,
Paul Johnson
Applewood House
www.applewoodhouse.com
----- Original Message -----
From: "Paul Johnson" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, June 25, 2003 8:51 PM
Subject: Re: offtopic: who can figure out this for loop
> 1. The ++x won't get compiled either :)
>
>
> Regards,
> Paul Johnson
> Applewood House
> www.applewoodhouse.com
>
>
> ----- Original Message -----
> From: "Aaron Ardiri" <[EMAIL PROTECTED]>
> To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> Sent: Tuesday, June 24, 2003 8:18 PM
> Subject: Re: offtopic: who can figure out this for loop
>
>
> > > Not really PalmOS related, but hey you can run it on your Handheld:
> > >
> > > int x = 1;
> > > for( int i = 0; i < 100; ++i );
> > > // What will the next line do? Increment???????????/
> > > ++x;
> > >
> > > what's the value of x after this code ran on a standard c++ compiler?
> >
> > 2.
> >
> > why?
> >
> > > for( int i = 0; i < 100; ++i ); <-- see that ';'
> >
> > the compiler interprets this code as:
> >
> > int x = 1;
> > for (int i=0; i<100; i++)
> > {
> > }
> > ++x;
> >
> > basic C :)
> >
> > ---
> > Aaron Ardiri [EMAIL PROTECTED]
> > CEO - CTO +46 70 656 1143
> > Mobile Wizardry http://www.mobilewizardry.com/
> >
> >
> > --
> > For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
> >
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/