HP Forums
Matrices on HP39gii (Cautionary Tale) - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: Matrices on HP39gii (Cautionary Tale) (/thread-240928.html)



Matrices on HP39gii (Cautionary Tale) - Eddie W. Shore - 03-20-2013

Don't try to store a matrix in a program, the calculator either gives an error or freezes.

Example code:

M1:=[[A,B],[C,D]]
where A, B, C, and D are previously defined, at least when A, B, C, and D are local.

I am thankful that the ON and backspace trick doesn't erase the memory.


Re: Matrices on HP39gii (Cautionary Tale) - Patrice - 03-21-2013

Actual firmware is evaluating matrix at compile time.
Hope it change in next firmware.

in home:
A:=A+1;[A,A+1]
the matrix use the value of A before the increment :(


Re: Matrices on HP39gii (Cautionary Tale) - Gilles Carpentier - 03-23-2013

I second you about this behavior.

A new firmware is needed...

here a small program for "sprites" ...
Works fine and quick but ... I crashed my calc with it. So be carefull and backup the 39GII memory ( Copy your sources in another place that the connectivity kit because all is lost in a bad crash !!)

EXPORT Sprite(Pause)
BEGIN
IF Pause==0 THEN Pause:=.00001 END;
L1:={ 0,0, 0,1, 1,0, 9,0, 10,0, 10,1, 0,9, 0,10, 1,10, 10,10, 10,9, 9,10, 2,3, 2,5, 3,2, 3,4, 4,1, 4,3, 5,2};
DIMGROB_P(G1,13,13,0); RECT_P(G1,0,0,12,12,3,0);
FOR I FROM 1 TO SIZE(L1) STEP 2 DO
PIXOFF_P(G1,L1(I)+1,L1(I+1)+1);
END;
RECT_P(0,0,255,126,0,3); X:=100;Y:=100;
REPEAT
X:=MIN(241,ABS(X+ISKEYDOWN(10)-ISKEYDOWN(14)));
Y:=MIN(112,ABS(Y+ISKEYDOWN(15)-ISKEYDOWN(9)));
BLIT_P(X+1,Y+1,G1); WAIT(Pause);
UNTIL 0;
END;

Usage

Sprite(0.01) //0 is max speed
To exit ON/C

Small video on an adapted version

Snake II alpha


Edited: 24 Mar 2013, 6:07 a.m.