• 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: how to get the zero's out of a list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to get the zero's out of a list


  • Subject: Re: how to get the zero's out of a list
  • From: Nigel Garvey <email@hidden>
  • Date: Sat, 10 Mar 2001 11:29:05 +0000

John W Baxter wrote on Fri, 9 Mar 2001 18:32:17 -0800:

>And I was disappointed not to see at least one reply like
>
>set testlist to {"0", "1", "0", "4"}
>repeat with anItem in testlist
> if contents of anItem is "0" then set contents of anItem to ""
>end repeat
>testlist
>
>along with probably a sentence or three about those "contents of" phrases
>(are both really needed in this case?...I just tossed them in to be "safe").

Yes. As you know, anItem is a reference whose value is 'item (whatever)
of testlist'. The first 'contents of' is needed for the equality test, as
references aren't automatically resolved for these. The second, of
course, changes the value of the list item referred to by anItem rather
than that of anItem itself.

NG


  • Prev by Date: Re: FileMaker and Styled Text
  • Next by Date: Components - How to?
  • Previous by thread: Re: how to get the zero's out of a list
  • Next by thread: get and mail current IP address (was Re: The Problem - IN DEPTH, please read carefully :))
  • Index(es):
    • Date
    • Thread