Примеры программ на языке QBASIC

REM Вывод массива в окне
DECLARE SUB PRINTA (ROW%, COL%, W%, C%(), N%, M%)
DEFINT A-Z
CLS
DIM A(2, 3), B(3, 3)
FOR I = 0 TO 2: FOR J = 0 TO 3
  A(I, J) = I * I + J * J
NEXT J: NEXT I
PRINTA 5, 5, 3, A(), 3, 4
FOR I = 0 TO 3: FOR J = 0 TO 3
  B(I, J) = I * 10 + J * 25
NEXT J: NEXT I
PRINTA 5, 40, 5, B(), 4, 4
END

SUB PRINTA (ROW%, COL%, W%, C%(), N%, M%)
DEFINT A-Z
DIM F AS STRING
F = LEFT$("##########", W)
FOR I = 0 TO N - 1: FOR J = 0 TO M - 1
  LOCATE ROW + I, COL + J * W
  PRINT USING F; C(I, J)
NEXT J: NEXT I
END SUB