Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Circumventing the ''Variable Not Found.'' error
Message
From
17/10/2000 16:24:23
 
 
To
17/10/2000 16:10:43
Josh Fedke
National Financial Corporation
Milwaukee, Wisconsin, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00430548
Message ID:
00430559
Views:
11
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform