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

[REBOL] Block parsing - function! datatype

From: pwawood:gmai:l at: 21-Jul-2007 17:20

When parsing a block for a function! value, I'm finding the value that I'm trying to set gets set to [second function] value rather than the function:
>> a: func [] [12.34] >> parse [:a] [set b function!]
== false
>> source b
b: [12.34] Is this the expected behaviour? My workaround is a bit cumbersome:
>> parse [first :a second :a] [set spec block! set body block!]
== false
>> b: func spec body >> source b
b: func [/local][12.34]
>> b
== 12.34 Any improvements? Regards Peter