Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
One exit per procedure/function/codeblock to what purpos
Message
From
09/10/2003 07:59:33
Walter Meester
HoogkarspelNetherlands
 
 
To
09/10/2003 07:40:21
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00835552
Message ID:
00836719
Views:
31
Cetin,

>>
PROCEDURE SomeProc
>>LOCAL SomeVariables, lRet, nX
>>
>>DO CASE
>>   CASE !THIS.GetValidDateRanges()
>>
>>   CASE THIS.ExecSomeOtherCode() AND TYPE('.arrItems[1,1]')#'N'
>>
>>   OTHERWISE
>>      nX = 1
>>      lRet = .T.
>>
>>      DO WHILE nX >= ALEN(THIS.arrItems,1) AND lRet
>>         lRet = (THIS.arrItems[ix,2] # 'somecondition' OR THIS.SomeOtherProc(nX)) AND ;
>>                (THIS.arrItems[ix,3] # 'somecondition2' OR THIS.SomeOtherProc2(nX))
>>
>>         nX = nX + 1
>>      ENDDO
>>ENDCASE
>>RETURN lRet
>Walter,
>I think this is much less efficient and result wouldn't be the same. Recheck original for..endfor loop and my reply to Evan:)

I´ve read that, but the original sample did not execute the FOR loop of the conditions before that where met. So in this respect the algoritm is the same. Also I don´t see why it is not efficient.

Walter,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform