Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!ix.netcom.com!netcom.com!mbondr
From: mbondr@netcom.com (Mark Bondurant)
Subject: newbie question: saving variables by value
Message-ID: <mbondrD6BFtH.3DE@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
Date: Fri, 31 Mar 1995 17:41:41 GMT
Lines: 16
Sender: mbondr@netcom10.netcom.com

The problem:

	| a b |

	a := Array new: 2.
	b := 1.
	a at: 1 put: b.
	b := 2.
	a at: 2 put: b.
	a
	 #(2 2)

I want to put the value of b in the array, not a reference to it.

Mark

