 |
geosmith Wanderer
Joined: 23 Apr 2005 Posts: 57
|
Posted: Thu Jul 28, 2005 6:53 am
Problems using %ismember |
Hi there,
Basically I'm trying to use #IF and %ismember to determine whether any of the values stored within a string list occur on another string list, then have a particular event occur if they don't.
I've tried the following...
#if (%ismember(@variableA,@variableB)) {} {result}
... but with little success.
I've tried to avoid using "#FO @variableA", on the grounds that I want the result to occur only if -none- of the values of variableA are on variableB, not for every single one that isn't.
Any advice on this would be appreciated. |
|
|
 |
Full Throttle Wanderer
Joined: 07 Dec 2004 Posts: 65
|
Posted: Thu Jul 28, 2005 8:28 am |
#variable member_count 0
#forall @list_a {#if %ismember(%i,@list_b) {#add member_count 1}}
#if (@member_count = 0) {#echo no common members} |
|
|
 |
geosmith Wanderer
Joined: 23 Apr 2005 Posts: 57
|
Posted: Thu Jul 28, 2005 8:40 am |
Perfect, thanks! 
|
|
|
 |
|
|