Jason Rennie <[EMAIL PROTECTED]> writes:

> > All very well, except that this is a contingency occurring early
> > in the process. Even if the flag =1, the process will still
> > continue down the loop. I'd like to find a way (other than using
> > GOTO) simply to jump out of the loop, jump over the intervening
> > subprograms (which are all concerned with continuing after a
> > correct response has been received) and simply quitting.
> 
> This might be a rather obvious answer (fear so) but does QBasic have the
> C equivalent of an exit() function call.
> 
> It simply termiantes the program then and there. It also returns an error
> code to the opreating system.
> 

I guess it should be said here that there is an "unbreakable" golden
rule in programming style which says multiple exit points in a
function is a no-no.... and that there should only be one exit point
at the end.

Like most "unbreakable" golden rules in programming, there are many
cases when one should break it. The problem is that everyone has a
different idea on what those cases are.  Blood has been spilled in
various attempts to come to an agreement. :)

Multiple exit points on error conditions is probably ok, but I'm
not willing to risk life or limb to defend that assertion.

-- 
:%s/[Ll]inux/GNU\/Linux/g


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to