Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!quiche!storm From: storm@cs.mcgill.ca (Marc WANDSCHNEIDER) Newsgroups: comp.lang.pascal Subject: Messy Stuff Message-ID: <1991Apr17.235717.7580@cs.mcgill.ca> Date: 17 Apr 91 23:57:17 GMT Sender: news@cs.mcgill.ca (Netnews Administrator) Organization: SOCS, McGill University, Montreal, Canada Lines: 32 Good Morning. I am currently writing a program, and in a bit of a quandery over what to do over error handling. What I want to do is something like the following: begin procedure if not Error, continue procedure if not Error, contineu procedure if not Error, continue... etc... end. However, the only way I've come up with so far to do that is have all procedures in fact be functions which return a so called "ErrorCode". The main program then does an IF to see if it's 0 (no error), and otherwise won't let it continue. Is there a way to do this somewhat more efficiently, or is my MAIN stuck with IF THEN ELSE mania....? ./*- -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ storm@cs.mcgill.ca McGill University It's 11pm, do YOU Marc Wandschneider Montreal, CANADA know what time it is? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~