[REBOL] Re: Beginner's questions on REBOL/Core and REBOL/View
From: joel:neely:fedex at: 11-Sep-2002 9:09
Hi, Andreas,
Welcome to REBOL and the list!
----- Original Message -----
> REBOL/Core
> - error messages do not locate where the problem occurred
> but present a very vage description of their orgin only
> How can I retrieve the number of the faulty line?
>
The short answer is "you can't". One feature of REBOL this
differs from most other programming languages is that the
distinction between "code" and "data" is not relevant. REBOL
can evaluate anything, including blocks that were constructed
as the result of evaluating other expressions. So, in general,
the concept of "source line" simply isn't meaningful.
For example:
a: [b:]
c: [2 + 2]
d: append a c
insert d first [print]
do d
(I'm composing at the keyboard on a borrowed machine, so forgive
me if I make a typo...)
Evaluating the above expressions constructs a new block and then
evaluates that block. If an error had occurred during evaluating
the last expression (the last value of D), how would we have any
concept of "which line" was involved?
Let me emphasize that I'm not criticizing the question, just trying
to show how it depends on assumptions that may be true of other
programming languages, but not of REBOL.
Good luck with your learning, and please feel free to use this list
any time you have questions. I've found it very open and helpful
during my time with REBOL!
-jn-