Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Single exit-point
Message
From
03/04/2002 09:47:40
 
 
To
03/04/2002 09:31:37
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00640316
Message ID:
00640322
Views:
15
Hilmar,

I try to follow this design principal with the exception of parameter checking at the beginning of a function/method. If something is missing or wrong, then I usually bail out. This generally happens before any environment settings have been made and therefore doesn't require special cleanup.

>I read somewhere that a function (or method) should have a single point of exit (RETURN). Is this considered a general design principle, that should usually be followed?
>
>I find that it is more complicated to code a function or method to have a single RETURN, but I also see that it may make cleanup (if required) easier.
>
>TIA, Hilmar.
Daniel
Previous
Reply
Map
View

Click here to load this message in the networking platform