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

[REBOL] Re: Help me, Obi Reb Kenobi, you're my only hope!

From: al:bri:xtra at: 28-Aug-2002 17:11

> And curiously, not only does Print fail, but so does Write. And that is
a function that I need error trapping on, if ever there was one.
>> type? try [print "The Force will be with you; always."]
The Force will be with you; always. == unset!
>> type? try [write %Force.txt "The Force will be with you; always."]
== unset! Both 'print and 'write return a unset! value, which can't be "assigned" as a value to 'Fred, by the set-word "Fred:". Perhaps 'attempt from the latest Rebol/Core might be more useful to you:
>> source attempt
attempt: func [ {Tries to evaluate and returns result or NONE on error.} value ][ if not error? set/any 'value try :value [get/any 'value] ] I hope that helps! Andrew Martin Rebol Superhero! :) ICQ: 26227169 http://valley.150m.com/