Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetPem() in disarray
Message
From
30/12/2016 12:03:38
 
 
To
30/12/2016 06:08:39
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2003
Database:
MS SQL Server
Miscellaneous
Thread ID:
01646177
Message ID:
01646221
Views:
80
>>>>
>>>>?eval("oo."+"arr[2,2]")
>>>>
>>>
>>>Eval() is only slightly better than macro - that's what I eventually did, that's the quick and dirty.
>>
>>not true. Check it.
>
>I know it's lots faster and doesn't hide compilation errors (like a macro does - one & somewhere on a horribly wrong line and it goes uncompiled until runtime), but it's still something that's interpreted at runtime and I'd better check for type of the expression I'm eval()uating so it doesn't error out. I guess getpem() and pemstatus() are doing the same, more or less.
>
>In this case I had to do an ascan() on one of the dozen arrays stored as properties of This, and then pick the element from that row. Works fine enough with a macro for the array name, though now I'm thinking it may be better served with storing all of these values into a cursor (actually two cursors, one array has three columns while others have two).
? type("oo.arr",1)
? type("oo.arr[2,2]")
? type("oo.arr[7,2]")
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform