Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Single exit-point
Message
From
03/04/2002 09:56:36
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
03/04/2002 09:38:26
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00640316
Message ID:
00640328
Views:
26
>>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.
>
>If that's really a general principle I prefer to be a rare specious :)
>Cetin

Thanks.

Well, I don't usually follow this principle either. But I have seen, in one specific case, where I needed lots of cleanup code in a method, that it helped to do this.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform