Re: Snippet to remove an item from a list
Re: Snippet to remove an item from a list
- Subject: Re: Snippet to remove an item from a list
- From: Arthur J Knapp <email@hidden>
- Date: Wed, 11 Jul 2001 11:03:51 -0400
>
Date: Tue, 10 Jul 2001 10:05:12 -0700
>
Subject: Re: Snippet to remove an item from a list
>
From: Paul Berkowitz <email@hidden>
>
On 7/10/01 6:51 AM, "Arthur J Knapp" <email@hidden> wrote:
>
> Here are some new creations:
>
> on IndexOf(lst, itm)
>
> set x to 1
>
> tell no & lst to if {itm} is in it then repeat until item x = itm
>
> set x to x + 1
>
> end repeat
>
> x - 1
>
> end IndexOf
>
Aaagh! The ghost of richard23 is come again...
;-)
As a matter of fact, this playful little handler was inspired by
Richard23's work, as well as Nigel Garvey's work with unusual "tell"
statements.
Arthur J. Knapp
http://www.stellarvisions.com
mailto:email@hidden
Hey, check out:
<
http://developer.apple.com/techpubs/macos8/InterproCom/AppleScriptScripters
/AppleScriptLangGuide/>