Something like this:
Code: Select all
01 LBL "TEST"
02 MATRIX[[0,1,2],[3,4,5],[6,7,8]]
03 END
Code: Select all
01 LBL "TEST"
02 MATRIX[[0,1,2],[3,4,5],[6,7,8]]
03 END
Code: Select all
00 { 48-Byte Prgm }
01▸LBL "M"
02 3
03 ENTER
04 NEWMAT
05 EDIT
06 0
07 →
08 1
09 →
10 2
11 →
12 3
13 →
14 4
15 →
16 5
17 →
18 6
19 →
20 7
21 →
22 8
23 EXITALL
24 END
Code: Select all
01 LBL "TEST"
02 SF 25 @Ignore errors
03 RCL "MatrixX" @Will fail if Nonexistent, but how to detect?
...
04 if "MatrixX" doesn't exist, then
05 XEQ 00 @create and initialize "MatrixX"
You can detect an error by setting flag 25 just before an instruction
and then testing the flag after the instruction to see if it has been
cleared. (Generally, you should test and clear flag 25—you risk los-
ing data if you choose to ignore unanticipated errors.) This enables
a program to branch rather than to stop execution in case of an
error.
Code: Select all
01 LBL "TEST"
02 SF 25 @Ignore errors
03 RCL "MatrixX"
04 FC?C 25
05 XEQ 00 @create and initialize "MatrixX"
...
I think you could create a program just for creating the hard-coded matrix. Once it is done you could delete this program, backup on your computer in case ... Then you have the matrix available as a variable and any program can access it as you like.