Members of the forum -

I defined an adverb to apply a test to a bunch of files but I made a thinko
and wrote it as though "fread" returns a number in non-error cases:

doOnFiles=: 1 : 0
   assert. 0<:rc=. fread y
   u rc
)

Of course, I meant to do a check like this:

assert. -._1-:rc=. fread y

Anyway, the mistaken version showed a disturbing tendency to end my
"jee.exe" session when using the debugger:

doOnFiles=: 1 : 0
   assert. 0<:rc=. fread y
   u rc
)

   $flnms=. {."1 dir 'DPLoan???.psv'
145
   rc=. ([:','&e.]) doOnFiles&>flnms
|domain error
|   0    <:rc=.fread y

NB. Turn on debugger and re-run:

   13!:0]1
   rc=. ([:','&e.]) doOnFiles&>flnms
|domain error: doOnFiles
|   0    <:rc=.fread y
|doOnFiles[0]
      y
DPloan000.psv
      $rc
28999463

NB. OK - I see the problem, so turn off halt mode:
      13!:0]0

[Thu 02/12/2009 | 16:55:38.98 | C:\Program Files\j602\bin]
>popdir

I was thrown out of J back to the DOS prompt.

Anyone else see behavior like this?  The same thing happens with a "j.exe"
session as well.  I'm running J6.02 under Windows XP, SP2.

Thanks,

Devon

-- 
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to