home *** CD-ROM | disk | FTP | other *** search
/ A.N.A.L.O.G. Magazine 1985 October / 85_oct.atr / matloc.lst < prev    next >
File List  |  2023-02-26  |  515b  |  1 lines

  1. 500 DIM MATLOC(4,6):REM MATLOC stands for MATrix LOCation.¢510 X=0:Y=0:VALUE=0:REM VALUE will equal the value of the number in the "box".¢520 IF X>4 THEN X=0:Y=Y+1:REM If column number is >4 then reset column number to 0 and increase row value by one.¢530 IF Y>6 THEN RETURN :REM RETURN to original program from subroutine, that is.¢540 IF VALUE>30 THEN VALUE=-1:REM When it gets to the 30th room, set the left over matrix "boxes" to -1.¢550 MATLOC(X,Y)=VALUE¢560 X=X+1:IF VALUE<>-1 THEN VALUE=VALUE+1¢570 GOTO 520¢