'goto" gone from computer languages or is it!

Vintage Computer Festival vcf at siconic.com
Mon May 16 18:24:01 CDT 2005


On Mon, 16 May 2005, Dave Dunfield wrote:

> >Um, if you're anal like me, you don't want to print a comma after the last
> >value, so:
> >
> >...
> >       printf ("%u", *aryp);
> >       if (i<n) printf (", ");
>
> Um, the original code won't print a comma after the last value.
>
> You could of course do something "clever" to make the
> extra conditional harder to see like:
>
>     for(i=0; i < n; ++i)
>       printf("%u%s", aryp[i], ","+(i >= n));

Um, you're right, but yours does ;)

(Can you spot the error? ;)

-- 

Sellam Ismail                                        Vintage Computer Festival
------------------------------------------------------------------------------
International Man of Intrigue and Danger                http://www.vintage.org

[ Old computing resources for business || Buy/Sell/Trade Vintage Computers   ]
[ and academia at www.VintageTech.com  || at http://marketplace.vintage.org  ]



More information about the cctalk mailing list