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

[REBOL] Re: Bug of TRY was bug of function error?

From: lmecir:mbox:vol:cz at: 23-Jul-2002 15:49

Hi Romano, <<Romano Paolo Tenca">> ...snip... the conclusion is that this string fails with some functions and works with others Right? Is not clear to me why this happens. --- Ciao Romano <</Romano>> <<L>> Yes, exactly! I don't know why the script fails with MOLD or PRINT, I would prefer it to work smoothly. Some time ago I discussed a related thing with feedback: b: next "a" clear head b index? b ; ** Script Error: Out of range or past end I would prefer to get the information instead of an error. To get the number I had to write my own function MINDEX in My function works hard to compute something that should be easily obtainable from the native IMO. Another example of the behaviour is: same? b b ; ** Script Error: Out of range or past end instead of the result I prefer, which is TRUE in this case. RT prefer to catch the (supposed) error, but they aren't able to catch it when it occurs, i.e. when the code (clear head b) is evaluated. My philosophy is different: because the value can be obtained legally (it is almost impossible to detect it when it occurs), I would rather treat is as a legal value, e.g. as an empty series. A curiosity: append b "a" empty? b ; == true is undetectable for the interpreter. Ciao -L