Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ascan with Objects
Message
De
24/12/2001 15:22:05
 
 
À
23/12/2001 23:59:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00597875
Message ID:
00597987
Vues:
13
>Hello All,
>
>I have a puzzling question. I have an array of objects which I am using as a sort of Matrix. Say I have an object an I want to determine if it is in the array and if so return the element of the array. According to the Hacker's Guide I cannot use Ascan for Objects. Does anyone know of another way to call Ascan (or something similar) with out having to create a second array?
>
>Matt

loe1 = createobject("custom")
loe1.tag = sys(2015)
loe2 = createobject("custom")
loe2.tag = sys(2015)
* for most applications, the second column is unnecessary
dimension laes[2,3]
laes[1,1] = loe1.tag
laes[1,2] = loe1
laes[1,3] = "associated value1"
laes[2,1] = loe2.tag
laes[2,2] = loe2
laes[2,3] = "associated value2"
? asubscript(laes, ascan(laes, loe2.tag), 1)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform