I suspect there is some optimization issue for -/"1 , replacing it with an
explicit definion seems workaround the bug,

NB. Illustration of inconsistent value retrieval/display in j602, j701
NB. bad.ijs  ALA 2011

m1=: 3 : 0"1
-/y
)

dbr 1
assert=: ([ (([`([ (13!:8) 2:))@. (0: e. ])) ])   NB. Dyadic

NB. For neater results:  
'Please execute 13!:0 ] 1 first.' assert 13!:17 ''

NB. ==========================

smoutput 'Redisplay relevant variable after stop.'

cdir=: 0 2
creg=: 8 2$ 2 4 4 4 4 0 2 0 2 2 0 2 0 4 2 4
gsegssti=: 6 5 4
gsegst=: 2 2

smoutput bdysegs=: 2 ]/\ (|.`]`] @. (1+ * gsegssti) gsegssti){ creg
smoutput ',bdysegs: ', ": , bdysegs
'bdysegs' assert , 1000> | bdysegs

b0=: |: _1 1* * - -/ gsegst
b1=: ((2* * cdir),: - m1 bdysegs)
smoutput ',b1: ', ": , b1
'b1' assert , 1000> | b1

b2=: (* cdir)
bdirs=: b2, b1, b0
smoutput ',bdirs: ', ": , b0, b1, b2, bdirs
assert , 1000> | bdirs

smoutput 'Load again (perhaps in new session)'
NB. ===========================

Вск, 15 Май 2011, Arthur Anger писал(а):
> On Sat, 14 May 2011 18:08:25 -0400, Henry Rich <[email protected]> wrote:
> > Since we can look at the source code, we might be able to find the bug.
> >  Can you cut the problem down to the bare minimum case that makes the
> > problem show up?  If so, post that.
> ------------------
> I have posted script bad1.ijs as an attachment to my home page at 
> ArtAnger. Loading it in a new session, after turning on debugging, 
> usually generates a
> partially random value stored for bdysegs.  (Turning off debugging has not
> prevented the problem;  turning it on reports it earlier.)
> --Art Anger
> ---------------
>    JVERSION
> Installer: j602a_mac_intel.dmg
> Engine: j602/2008-03-03/16:45
> Library: 6.02.023
>    13!:0 ] 1
>    load '~user/bad1.ijs'
> Redisplay relevant variable after stop.
> 0 2
> 2 2
> ,bdysegs: 0 2 2 2
> |bdysegs: assert
> |assert[:0]
>       bdysegs
> 1734701945 115
>          0   0
> ----------------
>    JVERSION
> Engine: j701/2011-01-10/11:25
> Library: 7.01.040
> Platform: Darwin 32
> Installer: j701a_mac_intel.dmg
> InstallPath: /Applications/j701
>    13!:0 ] 1
>    load '~user/bad1.ijs'
> Redisplay relevant variable after stop.
> 0 2
> 2 2
> ,bdysegs: 0 2 2 2
> |bdysegs: assert
> |assert[:0]
>       bdysegs
> 825893173 3156280
>         0       0
> ------------------
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to