General information
Category:
Coding, syntax & commands
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only