Pekka Buttler wrote:
>
> People!
>
> Ever looked up getPos?
yes!! i did!!!!!!!
>
> Syntax getPos(list, value)
>
> Description List function; identifies the position of the value specified by
> value in the list specified by list. When the specified value is not in the
> list, the getPos command returns the value 0.
>
> For values contained in the list more than once, only the first occurrence
> is displayed. This command performs the same function as the getOne command
> when used for linear lists.
>
> Example This statement identifies the position of the value 12 in the list
> Answers, which consists of [#a:10, #b:12, #c:15, #d:22]:
>
> getPos(Answers, 12)
>
> The result is 2, because 12 is the second value in the list.
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> > Behalf Of Nick Youmans
> > Sent: 26. heinäkuuta 2001 22:49
> > To: [EMAIL PROTECTED]
> > Subject: Re: <lingo-l> list and variable
> >
> >
> > > how can i find if there an item taht i'm looking for in a list
> > if i don't
> > > know it's position
> > >
> > > example
> > > mylist = [a, d, p, o]
> > > and i want to know if d is in the list but it could be in any
> > position in
> > > the list
> >
> > position = 0
> > repeat while i = 1 to mylist.count
> > if mylist[i] = "d" then
> > position = i
> > exit repeat
> > end if
> > end repeat
> >
> > you can then take position and do anything you want with it...
> >
> > good luck,
> > Nick
> >
> >
> > [To remove yourself from this list, or to change to digest mode, go to
> > http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
> > email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
> > Lingo-L is for learning and helping with programming Lingo. Thanks!]
> >
>
> [To remove yourself from this list, or to change to digest mode, go to
> http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
> email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
> Lingo-L is for learning and helping with programming Lingo. Thanks!]
--
R. Bhakti Klein
Instructional Media Developer, Distributed Learning Workshop
http://www.dlworkshop.net/
··
Baritone, Wicki6
http://www.wicki6.com
···
"On Earth, you can only do little things;
but you can do them with a lot of Love."
-- Mother Theresa
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]