Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Argument starter - The roots of all evil
Message
From
08/09/2004 10:22:13
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00938079
Message ID:
00940272
Views:
51
>SNIP
>
>>Terry,
>>PMFJI
>>LOOP might be (hardly) avoided under all circumstances but I simply can't understand how a VFP coder can live w/o EXIT and multiple RETURNs provided cares for performance (not only VFP really).
>>Never say Never:)
>>Cetin
>
>Cetin
>NAAJIIYW
>I can't see how a developer can live with himself with multiple returns! :-)
>I've conceded that the odd *small* routine with a for... EXIT.. EndFor to, say, look up in a large list, could be tolerated and, indeed, as Tamor's research has shown, can be beneficial performance-wise. But why need loops? e.g:
>
>Scan
>  If <condition>
>      LOOP
>  Endif
>  Meat
>endscan
>
>can easily be replaced with
>
>Scan
>  If not <condition>
>      Meat
>  Endif
>endscan
>
Terry,
Small code snippets are never < g > enough to show that you need or not need at all.
If 'Meat' is long enough and already contains many levels of other if..endif,do..enddo and alike would be more readable w/o a LOOP?
Wouldn't then I need to check the code down to endscan matching ENDIF carefully to that starting IF to see under that conditon is not met it's simply advancing next?
LOOP answers the readability part.
I couldn't understand the first sentence - do you mean you can live w/o multiple RETURNs? For slower code why not, it's acceptable and is a matter of developer style.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform