Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
One exit per procedure/function/codeblock to what purpos
Message
De
09/10/2003 07:40:21
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
09/10/2003 07:17:49
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00835552
Message ID:
00836711
Vues:
30
>How about ?
>
>
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
>
>Compact, and in some respect somewhat dirty. However I find this very clear to read.
>
>Walter,

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:)
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform