Matrix multiplication: Difference between revisions

Content added Content deleted
m (Applesoft BASIC)
m (Applesoft BASIC header)
Line 1,002: Line 1,002:
END IF</lang>
END IF</lang>


=== Applesoft BASIC ===
==={{header|Applesoft BASIC}}===
A nine-liner that fits on one screen. The code and variable names are similar to [[#BASIC|BASIC]] with DATA from [[Full_BASIC|Full BASIC]].
A nine-liner that fits on one screen. The code and variable names are similar to [[#BASIC|BASIC]] with DATA from [[Full_BASIC|Full BASIC]].
<lang gwbasic> 1 FOR K = 0 TO 1:M = O:N = P: READ O,P: IF K THEN DIM B(O,P): IF N < > O THEN PRINT "INVALID DIMENSIONS": STOP
<lang gwbasic> 1 FOR K = 0 TO 1:M = O:N = P: READ O,P: IF K THEN DIM B(O,P): IF N < > O THEN PRINT "INVALID DIMENSIONS": STOP