Using "chrome" in windows I can't repeat your error with many trials.
f=: 3 :'while. y>0 do. ((0 ; (,: ,: 0 6) );: 1)**y=.y-1 end.' f 100 f 1000 f 10000 Linda -----Original Message----- From: programming-boun...@jsoftware.com [mailto:programming-boun...@jsoftware.com] On Behalf Of Raul Miller Sent: Monday, January 09, 2012 12:40 PM To: Programming forum Subject: Re: [Jprogramming] sequential machine Something strange is going on, here: (0 ; (,: ,: 0 6) ) ;: 1 |index error | (0;(,:,:0 6)) ;:1 (0 ; (,: ,: 0 6) ) ;: 1 (0 ; (,: ,: 0 6) ) ;: 1 (0 ; (,: ,: 0 6) ) ;: 1 (0 ; (,: ,: 0 6) ) ;: 1 (0 ; (,: ,: 0 6) ) ;: 1 |index error | (0;(,:,:0 6)) ;:1 (0 ; (,: ,: 0 6) ) ;: 1 (0 ; (,: ,: 0 6) ) ;: 1 (0 ; (,: ,: 0 6) ) ;: 1 I suspect that the code is designed with an assumption that the character classes are complete, and it uses uninitialized memory when they are incomplete and an undefined class is referenced. -- Raul -- Raul On Mon, Jan 9, 2012 at 12:20 PM, David Ward Lambert <b49p23t...@stny.rr.com> wrote: > Simple machine to stop. Action 6 means "halt". > > Please explain why index error does not occur with y=. 1 . > Also, preprocessing precludes reasonable request. > > > (0 ; (,: ,: 0 6) ) ;: 0 NB. by default, an integer is its class > > NB. y=. 1 succeeds! > (0 ; (,: ,: 0 6) ) ;: 1 NB. there are always at least 2 classes? > > (0 ; (,: ,: 0 6) ) ;: 2 > |index error > | (0;(,:,:0 6)) ;:2 > > > NB. preprocessing appears to block a reasonable request > (0 ; ,: ,: 0 6) ;: i. 2 NB. machine would stop before trouble > |index error > | (0;,:,:0 6) ;:i.2 > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm