Re: Index of Handler
Re: Index of Handler
- Subject: Re: Index of Handler
- From: Michelle Steiner <email@hidden>
- Date: Wed, 11 Jul 2001 12:35:21 -0700
On 7/11/01 10:25 AM, List Guy <email@hidden> wrote:
>
on IndexOf(lst, itm)
>
set x to 1
>
tell missing value & lst
>
if {itm} is in it then
>
repeat until item x = itm
>
set x to x + 1
>
end repeat
>
end if
>
end tell
>
return x - 1
>
end IndexOf
>
>
might be clearer because it uses the "missing value" constant, except that
>
soemone might query the list to see if it contains a missing value.
And they will get 0 as the answer, so it will work.
--Michelle
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------