Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetPem() in disarray
Message
De
30/12/2016 12:03:38
 
 
À
30/12/2016 06:08:39
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2003
Database:
MS SQL Server
Divers
Thread ID:
01646177
Message ID:
01646221
Vues:
81
>>>>
>>>>?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]")
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform