Hmmm ...
void print_arg(int *aryp,size_t n)
{
printf("%u",*aryp++);
while(--n)
{
printf(",%u",*aryp++);
}
putchar('\n');
}
But has two calls to printf, with different format
strings. More than doubles the static string space.
Plus two complete printf call frames (bigger code)...
one being used only once.
All in the name of keeping a "structured" image.
I'm guessing this is NOT how you would code this
algorithm if you were programming in assembly
language...
gotos and other such structures are not evil - lack
of understanding of when such constructs are
appropriate (and not appropriate) is the real
problem. "Banning" the constructs just serves to
emphasize that this is not obvious to some people.
Hmmm... we seem to be sailing away from the topics
again!
Regards,
--
dave04a (at) Dave Dunfield
dunfield (dot) Firmware development services & tools:
www.dunfield.com
com Collector of vintage computing equipment:
http://www.parse.com/~ddunfield/museum/index.html