Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to: Push and Pop parameters?
Message
 
 
À
18/10/2001 10:42:19
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00570224
Message ID:
00570260
Vues:
20
Hi Mike,

You misunderstood me. I suggested that you make a copy of the patameter in the function/method and than work with that copy.
junk1.prg
Parameters tuParameter
*Make a copy of a parameter
local luParameter
luParameter = tuParameter
*Convert the string to an array to do some processing...
local array laArray[1,1]
laArray[1,1]="Something else"
dimension <b>luParameter[1,1]</b>
=acopy(laArray,<b>luParameter</b>)
*Do the processing using <b>luParameter</b> 
...
>Yeah, I thought of that too. I was just curious if I was missing something. I believe its common practice to have a function / method remember initial settings, make whatever changes are desired and restore the initial settings.
>
>Passing in a copy of the parameter to the function isn't as clean.
>
>>You can work with a copy of a parameter instead of parameter itself. This way you don't have to restore anything.
>>
< snip >
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform