SLUG Mailing List Archives
Re: [SLUG] That somewhat theoretical problem.
- To: "SLUG" <slug@xxxxxxxxxxx>
- Subject: Re: [SLUG] That somewhat theoretical problem.
- From: "Peter Faulks" <peter@xxxxxxxxxxxxxxx>
- Date: Tue Feb 20 16:45:02 2001
- Reply-to: "Peter Faulks" <pfaulks@xxxxxxxxxx>
On Tue, 20 Feb 2001 14:51:43 +1100 (EST), Jason Rennie wrote:
>I guess i'm a sloppy programmer then, i stick exit()'s in code when I have
>some nasty fail error, sinply becasue it is easy to see where it was up
>to, and the exits live with the broken peice of code :)
Well here is one circumstance where (IMO), it is quite OK to have
int ret = 0;
if((ret = dosomething()) == 0 )
if((ret = dosomethingelse()) == 0)
gotos should be used when they make sense, I reckon they definately
have their place.