'goto" gone from computer languages or is it!

John Hogerhuis jhoger at gmail.com
Mon May 16 17:03:23 CDT 2005


On 5/16/05, Sean 'Captain Napalm' Conner <spc at conman.org> wrote:

>   Hmmm ...
> 
>         void print_arg(int *aryp,size_t n)
>         {
>           printf("%u",*aryp++);
>           while(--n)
>           {
>             printf(",%u",*aryp++);
>           }
>           putchar('\n');
>         }
> 
>   -spc (avoids additional variables, no GOTOs, and one conditional ... )
> 
> 


<<THUMP>> (spc just hit in the forehead by an eraser).

Straighten up and get serious. You used twice as much printf as
everybody else. Have you ever seen the setup for a printf call in
assembler?

I wonder if even the compiler can save you from this shameless bit of excess.

 :-)

-- John.



More information about the cctalk mailing list