Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Protected array in recursive function
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00646889
Message ID:
00646895
Vues:
11
As Sergey said, make it local. In fact, all variables in a recursive function should be local (including parameters.) To make parameters local declare them with LPARAMETERS (instead of PARAMETERS.)


>Hi,
>
>I have a recursive function that uses an array to store data collected from a table. How can I protect this array from having its contents changed after the return of a recursive call?
>
>Let me try to explain better:
>
>
>Function recursive
>parameters x,y,z
>&& ...
>select a,b,c ;  && 1
>from tableX  ;
>into array w
>
>recursive(a,b,c) && 2
>&& ...
>
>
>How can I keep the contents of the array w that were select from tableX (1), after calling the function again (1), where another select will be done placing the result in the same array?
>
>TIA
>
>Alonso
Hector Correa
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform