[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sets
From: |
Ken Cline |
Subject: |
Re: sets |
Date: |
Fri, 25 Jun 1999 10:30:13 -0400 (EDT) |
What does [inventionset count] return? Note: the compiler
may complain about `count', but its there.
On Fri, 25 Jun 1999, Jonathan Impett wrote:
> Hello,
> I've clearly misconceived the working of sets - but could anyone
> please tell me why this works:
>
> inventionlist = [List create: self];
> [inventionlist addLast: invention1];
> [inventionlist addLast: invention2];
> no = [inventionlist getCount];
> printf("inventionlist has %d objects\n", no);
>
> but this -adding the same objects to a set instead of a list -
> doesn't (i.e. getCount returns zero):
>
> inventionset = [Set create: self];
> idptr1 = [inventionset add: invention1];
> idptr2 = [inventionset add: invention2];
> no = [inventionset getCount];
> printf("inventionsethas %d objects\n", no);
>
> Thanks,
> Jonathan
>
>
> Jonathan Impett
> Faculty of Music
> University of Cambridge
> West Road
> Cambridge CB3 9DP
> UK
>
> tel: (+44) (0)1954 250192
> address@hidden
>
>
>
>
>
>
>
>
> ==================================
> Swarm-Support is for discussion of the technical details of the day
> to day usage of Swarm. For list administration needs (esp.
> [un]subscribing), please send a message to <address@hidden>
> with "help" in the body of the message.
>
>
_________________________________________________________
Ken Cline address@hidden
SAIC VOICE (410) 571-0413
Annapolis, MD FAX (301) 261-8427
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
- sets, Jonathan Impett, 1999/06/25