Message-ID: <150326Z05101995@anon.penet.fi>
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!gatech!news.mathworks.com!tank.news.pipex.net!pipex!howland.reston.ans.net!EU.net!news.eunet.fi!anon.penet.fi
Newsgroups: comp.lang.smalltalk
From: an397723@anon.penet.fi (The Unknown Ranger)
X-Anonymously-To: comp.lang.smalltalk
Organization: Anonymous forwarding service
Reply-To: an397723@anon.penet.fi
Date: Thu,  5 Oct 1995 14:59:40 UTC
Subject: Yourself
Lines: 34



>>I'm confused.
>>
>>anArray := Array with: 10@20 with: 20@10.
>>anArray := (Array new: 2) at: 1 put: 10@20; at: 2 put: 20@10.
>>
>>where is the 'new' message in the first example?
>>

>There is none.  The with:with: method is a class method, hence, you
>don't need to create a new instance - the with:with: method will do
>that for you.
>
>Also, your second line won't work.  You need to add a ";yourself" at
>the end of the line before the period.
>
>David Buck
>dbuck@ccs.carleton.ca
>

I tried both of these. The first returned the entire array. The second 
returned only the 20 @ 10.  Are you saying that adding ";yourself" will 
return the entire array in the second example?  I'm confused between self 
and yourself.

I did try to find a with:with: method in Array and its superclasses to see 
if it did a 'new' automatically.  Perhaps I only looked at instance methods. 
Thanks.
--****ATTENTION****--****ATTENTION****--****ATTENTION****--***ATTENTION***
Your e-mail reply to this message WILL be *automatically* ANONYMIZED.
Please, report inappropriate use to                abuse@anon.penet.fi
For information (incl. non-anon reply) write to    help@anon.penet.fi
If you have any problems, address them to          admin@anon.penet.fi
