• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Snippet to remove an item from a list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: Mon, 09 Jul 2001 10:30:05 -0400

> Date: Sun, 8 Jul 2001 14:31:20 -0400
> From: Victor Yee <email@hidden>
> Subject: Re: Snippet to remove an item from a list

> on insertIntoList(listRef, insertIndex, insertValue)


on InsertAt(lst, x, val)
if (x = 1) then
return {val} & lst
else if (x > lst's length) then
return lst & {val}
else
return lst's items 1 thru (x - 1) & ,
{val} & lst's items x thru -1
end if
end InsertAt

InsertAt({"a", "b", "c", "d", "e"}, 3, "z")
-- > {"a", "b", "z", "c", "d", "e"}



Arthur J. Knapp
http://www.stellarvisions.com
mailto:email@hidden

Hey, check out:
http://www.latenightsw.com/freeware/JavaScriptOSA/


  • Prev by Date: Re: Three simple FMP questions
  • Next by Date: Re: Three simple FMP questions
  • Previous by thread: Re: Apple events dictionary or documentation?
  • Next by thread: Re: Snippet to remove an item from a list
  • Index(es):
    • Date
    • Thread