Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!husc6!linus!philabs!pwa-b!mmintl!franka From: franka@mmintl.UUCP Newsgroups: comp.lang.smalltalk Subject: Block variables Message-ID: <2084@mmintl.UUCP> Date: Thu, 2-Apr-87 20:38:44 EST Article-I.D.: mmintl.2084 Posted: Thu Apr 2 20:38:44 1987 Date-Received: Sun, 5-Apr-87 10:19:05 EST Reply-To: franka@mmintl.UUCP (Frank Adams) Organization: Multimate International, E. Hartford, CT Lines: 28 [Not food] What is the proper scope for the name of a variable which is a block argument? I had assumed it was the block only, but Smalltalk/V treats it as the entire method. Is this a bug? As an example of what I mean, consider the following: In UndefinedObject, define: test | x | x := 3. ^Array with: [ :x | x + 1] with: [x] Now evaluate: | temp | temp := nil test. (temp at: 1) value: 7. (temp at: 2) value Should the result be 3 or 7? (I am using ":=" as the assignment operator, as Smalltalk/V does.) Frank Adams ihnp4!philabs!pwa-b!mmintl!franka Ashton-Tate 52 Oakland Ave North E. Hartford, CT 06108