• 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: count of items in a reference to a list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: count of items in a reference to a list


  • Subject: Re: count of items in a reference to a list
  • From: John W Baxter <email@hidden>
  • Date: Mon, 9 Jul 2001 11:36:21 -0700

At 10:37 -0700 7/9/2001, Michelle Steiner wrote:
>On 7/9/01 9:48 AM, email@hidden <email@hidden> wrote:
>
>>set x to {"a", "b", "c"}
>>set countx to count of items in x
>>log countx
>>--> 3
>>set xr to a reference to x
>>set countxr to count of items in xr
>>--> every item of x of<<script>> doesn't understand the count message.
>

set x to {"a", "b", "c"}
set countx to count of items in x
log countx
--> 3
set xr to a reference to x
set countxr to count of items in contents of xr

will work, as will various forms which don't talk about items
count xr
count of xr

and the left-field way:
set countxr to length of xr


I would usually say count of xr, except in this sort of variant:
set x to {"a", "b", "c", 4}
set countx to count of items in x
log countx
--> 3
set xr to a reference to x
set countxr to count plain text in contents of xr

--> countxr contains 3

(note: I wrote "strings" and that compiled to "plain text"). That result
is 3; substitute "numbers" for "plain text" and the result is 1.

--John


--
John Baxter email@hidden Port Ludlow, WA, USA


References: 
 >Re: count of items in a reference to a list (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: count of items in a reference to a list
  • Next by Date: Re: What to AS on an app?
  • Previous by thread: Re: count of items in a reference to a list
  • Next by thread: Re: count of items in a reference to a list
  • Index(es):
    • Date
    • Thread