I expect the answer depends on your setup, but, at least in mine, in
JQt under Windows 10, I have
the line numbers option set to ON. The sequence ALT-v-n toggles that
option, ie VIEW/Toggle Line Numbers
If it's still difficult to spot what's going wrong, you can try
reloading your script using
0!:011 < <script-filename>
which displays every line. In case of an error, you see something like
this:
<<
rec =: - %
nonz =:
|syntax error
| nonz=:
|[-34] c:\users\mike_\j902-user\p729.ijs
f =: 3 : 0
>>
... which actually happened a few minutes ago. (I knew where the error
was, but used 0!:011 for
your benefit.)
But perhaps you have a somewhat different problem, as I don't find that
the line-numbers are in error,
or counter-intuitive; they even start from 1 .
Cheers,
Mike
On 12/10/2020 19:29, Arthur Anger wrote:
I recently spent 20-30 minutes tracking down the source of an error
condition caused by an ill-formed number. The error reported during load
began with '[-726]', and named the offending verb, but did not display the
line (or even just the "number").
The verb contained only about half that number of lines. The script had
a few more than 700, so scrolled back from its end about that far, to an
area in the offending verb, but did not easily spot the error.
I copied the verb definition to a separate file, and reloaded, getting
the identical errror message. Only after two more splits did I get a small
enough file to get the negative-line count close enough to the error to
recognize it on careful reading
My conclusion is that the error reports a count of statements, perhaps
including empties, but also including controls such as do. and else.
It is certainly useful to have some indicator of the error's location,
but I find the current indicator difficult to use.
--A number based on physical lines in the file would be more useful.
--A number counted from the top would be more conventional.
--A display of the offending character string would allow an immediate
search for it, which should nearly always be a unique target.
Thanks in advance to the team that considers an improvement in error
reporting and--perhaps--chooses and manages to install one.
--Art
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm