Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ascan with Objects
Message
From
24/12/2001 15:22:05
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00597875
Message ID:
00597987
Views:
17
>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)
Previous
Reply
Map
View

Click here to load this message in the networking platform