Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating A Variable Via a Reference?
Message
From
20/02/1998 10:09:41
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00080095
Message ID:
00080100
Views:
29
>I have a method in which I wish to make a particular variable private. The problem is, the name of the variable is held in the property of my form. I've tried a few different things without much luck, such as ...
>
>PRIVATE EVAL(thisform.cVariable)
>
>...without any luck. Suggestions?

Hi Michael,
Remove eval().
* Init
public myvar
myvar = 6

*thisform.myVarNameHolder = "myvar"

* any method
private (thisform.myVarNameHolder)
store 3 to (thisform.myVarNameHolder)
activate screen
? eval(thisform.myVarNameHolder)

* Another method
activate screen
? eval(thisform.myVarNameHolder)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform