gotos

Alan Myrvold ajmyrvold at violet.waterloo.edu
Sun Apr 17 13:55:45 AEST 1988


Why do I use goto's ? 

Because I believe that every function should have 
exactly one entry point and exactly one exit point.

Multiple RETURN statements are as bad as bad goto's -- i.e.
the thread of the subroutine gets confusing.

I only have labels at the end of my functions, and yes 
the real problem with neat code with goto's is that it is soooo easy
for someone else to start inserting code on the wrong side 
of the goto. But don't dock my pay for eliminating RETURN statements
that are scattered through a subroutine.  :-)

-------------------------------------------------------------------
Si je t'aime? Bien sur que je t'aime! Ne suis-je pas en train de
te le prouver encore une fois, dans ce lit? 
-------------------------------------------------------------------
Alan Myrvold     ajmyrvold at violet.waterloo.edu
-------------------------------------------------------------------



More information about the Comp.lang.c mailing list