|
From: | Paolo Bonzini |
Subject: | [Help-smalltalk] Re: Listing the variable names defined in a workspace or REPL session |
Date: | Wed, 09 Mar 2011 12:16:17 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7 |
On 03/04/2011 07:54 PM, ZuLuuuuuu wrote:
How can one list the variable names defined in a workspace or in a REPL session? For example, after executing these commands on terminal: $ gst GNU Smalltalk ready st> foo := 2 2 st> bar := 3 3 I want to get the variable names 'foo' and 'bar' in a collection or something.
Here is a huge hack: xyxyxyxy := nil. (#{xyxyxyxy} instVarAt: 3) keys :) Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |