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

[REBOL] Re: Use of 'context

From: brett:codeconscious at: 26-Apr-2001 19:54

Gee it took a while for me to realise... context takes a block! as an argument - which constrains what context can do- it can only take a block as a spec. compare this with the following which can use an object as a spec template-object: context [ name: does [print "template"] template-function: does [print "template func"] ] spec-object: context [ name: does [print "spec"] special-function: does [print "special"] ] specialised-object: make template-object spec-object so if you do probe specialised-object you get make object! [ name: func [][print "spec"] template-function: func [][print "template func"] special-function: func [][print "special"] ] Brett.