|
xiangwei Beginner
Joined: 17 Apr 2004 Posts: 18
|
Posted: Mon Jun 04, 2007 11:31 am
help me thanks |
how do what list=2|3|2|3|4|4|5|2|5|5|6|7
#show xxx(2,@list) or xxx(@list,2)
Displays: 1|3|8
i dont know xxx=what?
pls tell me thanks |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Mon Jun 04, 2007 2:31 pm |
Your question was a little confusing at first but I think I understand what you mean. Unfortunately there is no single function that does what you want.
Your closest bet would be %ismember which will return the first one. Perhaps the easiest to simulate the behavior you want is with a #FORALL loop. Try this.
Code: |
#VAR Count 0
#VAR test "2"
#FORALL @list {#ADD Count 1;#IF (@test =="%i") {#ADDITEM Found @Count }}
#SHOW @Found
|
The code's untested but should work. Either way you get the general idea. |
|
_________________ Asati di tempari! |
|
|
|
xiangwei Beginner
Joined: 17 Apr 2004 Posts: 18
|
Posted: Mon Jun 04, 2007 11:12 pm |
Thank you, this is what I need
|
|
|
|
|
|