Thank You for your detailed response. I would like to clarify point 2) from my previous message. The command Gosub N, a, b,c that I read about in "Command Reference" is a wonderful function similar to calling a procedure in other programming languages. But I don`t fully understand it`s behavior:......
The Local command in a single program is assigned to the same variable in all its subroutine calls.
.......
1➝A:2➝B:3➝C:4➝D Gosub A,A,B,C◢ ClrText Gosub B,A,B,C,D◢ Stop Lbl A Local a,b,c Disp "SubA",a+b+c Disp a,b,c Return Lbl B Local a,b,c,d Disp "SubB",a+b+c+d Disp a,b,c,d ReturnResults are:
SubA___SubB
_______6____________10
_______1_____________1
_______2_____________2
_______3_____________3
_____________________4
If you add a third Lbl_C subroutine in this fragment, the fourth parameter d stops working in the second Lbl_B subroutine:
1➝A:2➝B:3➝C:4➝D Gosub A,A,B,C◢ ClrText Gosub B,A,B,C,D◢ ClrText Gosub C,A,B,C◢ Stop Lbl A Local a,b,c Disp "SubA",a+b+c Disp a,b,c Return Lbl B Local a,b,c,d Disp "SubB",a+b+c+d Disp a,b,c,d Return Lbl C Local a,b,c, Disp "SubC",a^2+b^2+c^2 Disp a,b,c ReturnResults are:
SubA___SubB___SubC
_______6_____________6____________14
_______1_____________1____________1
_______2_____________2____________2
_______3_____________3____________3
_____________________0
If you now add a fourth parameter to the third subroutine ( Gosub C,A,B,C,D ... Lbl C:Local a,b,c,d ... ), the entire fragment will work correctly again:
SubA___SubB___SubC
_______6_____________10____________30
_______1______________1____________1
_______2______________2____________2
_______3______________3____________3
______________________4____________4
(tested in 9860gii(SH4) v2.45/15).
I wrote:
In my case, not only the horizontal (vertical) image of the matrix does change in edit mode and in the "Setup", but the Trn Mat N➝Mat N function is really randomly executed in program. In the near future I will try to reproduce this behavior in a separate fragment.1) When working with multiple matrices in program, they sometimes change the specification (m,n)↔(x,y). Columns and rows are swapped, which causes a Dimension ERROR message or an incorrect result.