Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: String to Object

From: gerardcote:gma:il at: 27-May-2009 21:27

Hi Kai, 2009/5/27 Kai Peters <kpeters-otaksoft.com>
>Given a block of strings as in >names: [ =93Joe=94 =93Mary=94 =93Wilbur=94 ] >and an object template >template: make object! [ count: 0 units: [] ] >How do I create an object for each of the names in >the names block so that I may do
I tried the following and it seems that it worked :
>> foreach name names [set to-word name :template] >> help joe
JOE is an object of value: count integer! 0 units block! length: 0
>> help Mary
MARY is an object of value: count integer! 0 units block! length: 0
>> Wilbur/count
== 0 -- Gérard Côté Québec, Canada