I have a moderately large and yet inefficient program which I was
trying to debug.

When I single step into a section of code where something mysterious
was happening, I am getting (this is in the middle pane of my debugger
window).

domain error
uint16[0] glsel ::]'g'

The problem is that uint16 does not contain any such code.

Here is the afflicted code:

      uint16
''"_ readuint16s

      readuint16s
1 : 0
  L=:*/2,N=.u y
  'off txt'=._2{.y
  (_2}.y),(N$uint16s L{.off}.txt);(off+L);txt
)

      uint16s
0&(3!:4)

My problem is that I am getting a domain error even when I am not
running under the debugger. If I set a breakpoint on all lines of
readuint16s, the domain error happens before the stop takes effect.
And, yes, if I put a stop on all lines of uint16, and examine its
argument, I see it is running in a monadic context:
      $(<0 6){::13!:13''
1

(And, for reference, 'off' would have been getting the value 4 and
'txt' would have been getting a literal which contained 12912
elements.)

I would like to comment further on this issue, but I have lost my copy
of the program.  I was searching (using Control-F) except the search
window was behind the debugging window.  And, I hit a key at the wrong
point which replaced the searched for text with the key I hit.  And
then I hit control-Z twice which took me back to the empty state the
file window apparently was in at the beginning of when I opened the
file, and then I hit Escape (I am a vi user and thus I hit escape
habitually), and this erased the file.

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to