Path: utzoo!utgpu!water!watmath!watdragon!violet!ajmyrvold From: ajmyrvold@violet.waterloo.edu (Alan Myrvold) Newsgroups: comp.lang.c Subject: Re: gotos Message-ID: <6434@watdragon.waterloo.edu> Date: 17 Apr 88 03:55:45 GMT Sender: daemon@watdragon.waterloo.edu Reply-To: ajmyrvold@violet.waterloo.edu (Alan Myrvold) Distribution: na Organization: U. of Waterloo, Ontario Lines: 20 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@violet.waterloo.edu -------------------------------------------------------------------