I am away from my machine, but I observe that the result of safeshow comes from echo, not z. Is that ok?
Henry Rich On Wed, Jun 15, 2022, 7:03 AM Raul Miller <[email protected]> wrote: > I am running into a problem, in J903 and J904 -- I haven't yet > installed earlier versions of J on this machine. > > safeshow=: 3 :0 > assert. 0 < N=:N-1 > z=. '' > assert. 1=#$z > echo #$z > 'l r'=. y{Kid > if. l<#Kid do. > z=. '(',(safeshow l),') ' > assert. 1=#$z > echo #$z > end. > z=. z,(":y{Key),':','BR'{~y{Red > assert. 1=#$z > echo #$z > if. r<#Kid do. > z=. z,' (',(safeshow r),')' > assert. 1=#$z > echo #$z > end. > ) > > Kid=: 1 2,_ 1,:_ _ > Key=: 94 48 92 > Red=: 0 1 1 > N=: 3 > safeshow 0 > 1 > 1 > 1 > |assertion failure: safeshow > > Now, there's a problem here with my data which triggers the assertion > -- Kid should not contain any duplicate values other than _. But > that's not what I am concerned with here. > > In Jqt, I enable debugging (control-K) and when the debugger pops up > on the assert, I go back to the previous stack frame, and I find that > z has rank 2, instead of rank 1. > > Specifically, it has the value '48:R',' (',:' ' > > So, now I am trying to figure out what's gone wrong. > > Conceptually, I could accept that z was being modified by virtual > block handling -- except there's no update to z which would have given > it a rank 2 value. > > Another possibility here is that there's something specifically wrong > with my machine. So: can anyone else reproduce this issue? > > And, ... the next most likely possibility is that there's something > wrong with the J engine itself. > > Anyways, I'd like to get someone else's perspective here. > > Thanks, > > -- > Raul > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
