The program:
! Produces a 3x3 matrix with 0 for all elements
! except where row=column, and prints them out.
! do trace, slow (row,column, Identity )
DIM Identity (1 to 3, 1 to 3)
FOR row = 1 to 3
FOR column = 1 to 3
IF row = column then
LET Identity (row,column)=1
ELSE
LET Identity (row,column)=0
END IF
NEXT column
NEXT row
FOR row = 1 to 3
FOR column = 1 to 3
PRINT Identity (row,column);
NEXT column
NEXT row
SOUND 1000,.1
PAUSE 4
END
The output:
1 0 0
0 1 0
0 0 1
Now put the code into PP8.1