Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mathematical Challenge (Lottery)
Message
De
30/05/2003 12:27:24
Walter Meester
HoogkarspelPays-Bas
 
 
À
30/05/2003 06:27:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00785796
Message ID:
00794576
Vues:
29
Gregory,

>I haven't compared the two. (have you ?)
>
>It is a modification of a piece of code I use, which transforms
>
>for i1 = .. to ..
>  for i2 = .. to ..
>    for ... = .. to ..
>     ...
>      for iN = ... to ...
>
>where # of i is not known at the start and is related to the # of items to combine, into a general loop using i[..]

I think they´re not comparable because the way you describe above your program is static if you change the number of levels you´ve got to change the program. Though it is manageble as we can compile on the fly it is not a prefferable way.

Further I did not find any working example this way that did the same thing except for george example. The recursive one was about 10 times as fast.

>I use recursion when I can. It's just that the # of levels is not known at the start and vfp has a sort-of low limit whereas in C I would have used recursion

For the problems described in the two threads the number of levels will not reach the maximum of 128 levels and thus will not be a problem at all.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform