Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Circumventing the ''Variable Not Found.'' error
Message
De
17/10/2000 16:24:23
 
 
À
17/10/2000 16:10:43
Josh Fedke
National Financial Corporation
Milwaukee, Wisconsin, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00430548
Message ID:
00430559
Vues:
12
>Foxpro's adir() does this awesome thing where it creates an array for the first parameter, if you didn't do it yourself. Since I would like to mimick the functionality of Adir(), I would like to do a similar thing.

YOu can do this:
on error createvariable(sys(2018))

=CreateVariable(Var2)
?Var2

function createvariable
	lparameters tcName
	lcPublic = 'PUBLIC ' + tcName
	&lcPublic
endfunc
the problem is it has to be declared public, otherwise it goes out of scope right away. In any case, ALL good code should have the variables declared somewhere, IMO.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform