Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetPem() in disarray
Message
De
30/12/2016 04:44:06
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
29/12/2016 09:26:46
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:
01646209
Vues:
134
>>Just for kicks, tried this:
>>
>>
oo=createobject("custom")
>>addproperty(oo, "arr[3,2]","zz")
>>oo.arr[1,1]="bbzz"
>>?getpem(oo, "arr")
>>?getpem(oo, "arr[2,2]")
>>
>>The debugger shows that oo has an array property, all six elements of which have the value of "zz" except "bbzz" in the first. The first output shows a "zz", the second throws an error, "Function argument value, type, or count is invalid.", which means that the 2nd parameter will accept only names, not names with index. Ditto when trying with a single index.
>>
>>Too bad, I just wanted to avoid using a bunch of macros to store about a dozen arrays into properties of an object. Now it will have to be the same old quick & dirty.
>
>
>?eval("oo."+"arr[2,2]")
>
Eval() is only slightly better than macro - that's what I eventually did, that's the quick and dirty.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform