I was writing a program to create random permutation matrix by taking an identity matrix and going through a row at a time, swapping the current row with a random row further down the matrix. I did a little arithmetic wrong and instead of choosing a random row from the current to the end of the matrix, I was choosing a random row starting one past the current row and going to one past the end of the matrix. I got some odd results!
You can try this at home (though I'm not sure that's advised, see below):
Code: Select all
01 LBL "TEST"
05 STO "TEST"
06 INDEX "TEST"
10 EDITN "TEST"
I ran this a few times. Row 1 would be filled with 0s, very large numbers, very small numbers, or blank alpha characters "". And then it locked up. When I reset, it gave me this code and asked me to report it: Reg Id d3770103, fw 3.12
Oops! So, don't try this unless you've got a saved state to return to, I guess.
Same thing happens when I try it on the Free42 app. I don't have an HP 42s, so I can't check that to see if it is expected behavior. The manual for the 42s doesn't specifically mention any error code that should happen under these circumstances. So who knows?