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

[REBOL] Re: Object -> Word?

From: GedB::Rushcoding::co::uk at: 20-Dec-2007 12:17

You have to draw the distinguish between the object o1 and the word 'o1 which is a label identifying the object. You just need to reduce the series to translate the words into the objects they reference. You can think of square brackets ([])as being rather like quotation marks (""). Within quotation marks you get a string of characters. Within square brackets you get a series of words. Both have to be evaluated.
>> o1: make object! [] >> o2: make object! [] >> probe type? o2
object! == object!
>> s: [o1 o2]
== [o1 o2]
>> probe type? s/1
word! == word!
>> probe s/1
o1 == o1
>> probe (s/1 = 'o1)
true == true
>> s: reduce [o1 o2]
== [make object! [ ] make object! [ ]]
>> probe s/1
make object! [ ]
>> probe (s/1 = o1)
true == true DESCRIPTION: Evaluates an expression or block expressions and returns the result. REDUCE is a native value. On Dec 20, 2007 3:08 AM, Kai Peters <kpeters-otaksoft.com> wrote: