Hi Guys,
Please take a look at this example.
I have 2 variables:
1. gVariable1["values"] = "1 2 3 4"
2. gVariable2["values"] = "4 5 6 7"
How can I check each value of gVariable1 and see if it is in gVariable2?
Kind Regards
Adam
comparing values
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 179
- Joined: Sat Apr 08, 2006 11:08 pm
- Contact:
Adam, I think Malte is right to ask about the real data, but given what you posted, as a starting point, I might do something like:
Best,
Mark
Code: Select all
function commonValuesPresent array1, array2
repeat for each word w in array1["values"]
if w is among the words of array2["values"] then return true
end repeat
return false
end commonValuesPresent
Mark