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

[REBOL] Re: url or file ?

From: SunandaDH:aol at: 4-Oct-2003 14:40

Patrick:
> I came to the same solution but ... load fails with some value:
...
> And I have no idea how to workaround this easily.
Load is not good if the values do not translate into REBOL words or datatypes. You may need to surround it with an error/try: s: "recipes/0001.html" loaded-s: form s error? try [loaded-s: load s] loaded-s is either now the original as a string, or the loaded values. Also, load can be dangerous if the string is untrusted. Try this: load "rebol [quit]" It'll exit your console. So you probably really need to use load/all. That returns a block, so your original code may need to become: s: "recipes/0001.html" loaded-s: form s error? try [loaded-s: first load/all s] Sunanda.