; TABLES
;
; Program for Proteus
;
; (C) 1998-2004 Simone Zanella Productions
;
; Print n * 1, .., n * 10, where n is between 1 and 10.
; Display the usage of matrices.
; Implicit parameters: NULL input and output
;!proteus -z
!include "matrix.prt"
; Create a matrix
M = MatNew(10, 10)
FOR X = 1 TO 10
FOR Y = 1 TO 10
; Set the element of the matrix
MatSet(M, X, Y, MUL(X, Y))
NEXT
NEXT
; Print tables
CONSOLELN " x1 x2 x3 x4 x5 x6 x7 x8 x9 x10"
CONSOLELN ""
FOR X = 1 TO 10
CONSOLE PFORMAT("2d", X) " "
FOR Y = 1 TO 10
CONSOLE PFORMAT("2d", MatGet(M, X, Y)) " "
NEXT
CONSOLELN ""
NEXT
CONSOLELN ""
CONSOLELN "Matrix size: " MatLen(M)
MatFree(M)
ABORT 0