I recently received an email from Tom Lake requesting the addition of matrix functions to BBC BASIC. I must confess that I'd never seen a BASIC dialect that offered native matrix functions, but some digging located the following:
I'm wondering if people had any requirements or suggestions for the
MAT statement. There are some limitations I have to work with; for example, any matrix operation
must be prefixed with
MAT, and matrices are not efficiently resizeable as BBC BASIC only stores the
current size, not the maximum size (matrices could be shrunk, but not expanded, without leaking memory).
To whet your appetites, here's the start; I've written some parsing code for the simplest
MAT statements -
ZER (set all elements to zero),
CON (set all elements to one) and
CON(expr) (set all elements to
expr). Though I've just realised that I'm missing the
= between the result array and the expression to the right, whoops.