grabbing value of a variabe by its name?

Ragnar Hojland Espinosa ragnar at linalco.com
Thu Jul 25 11:42:53 UTC 2002


foo _ 'hello'.
bar _ 'world!'.
baz _ #(foo bar).

I can get the name of the var by a (baz at: 1), but how do i get its value?


The reason for this question is as follows.  I have:

execute 'insert into table1 (var1,var2,var3) values (',
	var1 asQuotedPostgres,',',
	var2 asQuotedPostgres,',',
	var3 asQuotedPostgres,')'.

and I'd like to do something like:

fields _ SQLFields new: #(var1 var2 var3).
execute 'insert into table1 (', fields asNames, ') values (', 
	fields asValues, ')'. 
-- 
Ragnar Hojland - Project Manager
Linalco "Especialistas Linux y en Software Libre"
Tel: +34-91-5970074 Fax: +34-91-5970083



More information about the Squeak-dev mailing list