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

[REBOL] Re: why 2 error?

From: lmecir:mbox:vol:cz at: 23-Nov-2001 10:04

The difference is as follows: disarm err: make error! {an error} undefined? 'err ; == false word: 'err error? try [get/any :word] ; == true Personne savant n'est tombe de ciel, comme on dit chez nous. (could you correct my translation?) Cheers Ladislav ----- Original Message ----- From: "Patrick Philipot" <[pat665--ifrance--com]> To: <[rebol-list--rebol--com]> Sent: Thursday, November 22, 2001 10:30 PM Subject: [REBOL] why 2 error? Hi, Reading Ladislav "Words, Aliases, Contexts, Visualizations, Bindings and Scope in Rebol.html" I found the following function. undefined?: func [ {determines, if a word is undefined} word [any-word!] ] [ error? try [error? get/any :word] ] I can't figure out why there is two error? in the last line. It seems to me (and I have experimented on the console) that >> error? try [get/any :word] << will do the job as well. I'm afraid I am missing something because I have seen in many rebol-list posts that Ladislav is dedicated to produce clean and concise code. So what's wrong with my shorter (and presumptuous) version ? Mais c'est en forgeant, qu'on devient forgeron, comme on dit chez nous. Patrick