Specific element of a plural value

(imported topic written by SystemAdmin)

I was thinking about a sample I posted earlier with regards to a string set. (http://forum.bigfix.com/viewtopic.php?id=4200)

Without having to concatenate a string set and then parsing through to get each element individually, is there a better way to do it?

E.g.

(preceding text of first “,” of it = “abc” and following text of first “,” of it = “def”) of concatenation “,” of (“abc”;“def”)

Is there a simple way to look at the 1st and second element like this pseudo code?

(element 1 of it = “abc” and element 2 of it = “def”) of (“abc”,“def”)

Although I could use an intersection, that doesn’t compare only the 1st elements and then only the second elements.

(imported comment written by jessewk)

No,we can’t index into lists b/c not all items in the list are held in memory by the relevance engine at the same time. We talk about this internally all the time and unfortunately the performance implications for adding these types of inspectors, particularly on the client side, are often unacceptable in the worst case scenarios. It would also be a major change to the underlying structure of the language interperter.

You could may be able to come up with a tuple based solution though:

( ( item 0 of it = “abc” and item 1 of it = “def” ) OR ( item 2 of it = “ghi” and item 3 of it = “jkl” ) ) of (“abc” , “def”, “ghi” , “jkl”)

(imported comment written by SystemAdmin)

I think that’s what I want to do. I think that would have been easier in the above topic when comparing the PC type and then the version of the BIOS.

(imported comment written by SystemAdmin)

Hmm… Seems if I compare string manipulations vs a tuple, tuples are a few ms slower. Though it does seem to be more readable. I put another relevance in the other topic. Not sure which I like better.

Thx for the tuple example.