Hello [EMAIL PROTECTED]!
On 15-Gen-00, you wrote:
i> IMHO most of the time there is a linenumber involved, in your
i> special cases:
I've been reading this thread, and thinking about this... I think
the problem is that REBOL has no idea of what a line number is
while executing some code. It knows about line numbers only when
it loads it. Example:
>> load {
{ abc
{ def
{ ghi
{ j,k
{ etc
{ etc
{ }
** Syntax Error: Invalid word -- j,k.
** Where: (line 5) j,k
Notice that "(line 5)". But once the code has been loaded, it is
just a block, and it doesn't know about lines or line numbers.
It could be possible to store a line number with each word, or
even each value... but I don't know if this would be a good thing.
Anyway, using PROBEs helps a lot to find bugs. Don't forget that
REBOL is (almost) a functional language, so if you split your
scripts into functions and test the functions separately you
should not have big problems finding bugs.
If you have a big messy script and very little time, take the
"where" given by the error message, fire up your text editor,
search for each occurrence of that piece of code, put some PROBEs
around that, and try again running the script. It's a fast enough
way to find the right piece of code...
Regards,
Gabriele.
--
o--------------------) .-^-. (----------------------------------o
| Gabriele Santilli / /_/_\_\ \ Amiga Group Italia --- L'Aquila |
| GIESSE on IRC \ \-\_/-/ / http://www.amyresource.it/AGI/ |
o--------------------) `-v-' (----------------------------------o