MediaWiki:Sitenotice:
2024-03-02: The wiki ran out of disk space, so things were not working. This has been resolved by adding another 5GB of quota ;-) Thanks to Tim Lindner for reporting the issues. 2020-05-17: If a page gives you an error about some revision not being found, just EDIT the page and the old page should appear in the editor. If it does, just SAVE that and the page should be restored. OS-9 Al (talk) 12:22, 17 May 2020 (CDT)

PLOTTER

From CoCopedia - The Tandy/Radio Shack Color Computer Wiki
Jump to navigation Jump to search
100 DIM X(100),Y(100)
110 CLS: PRINT@5,"POINT GRAPH PROGRAM"
120 PRINT@32,"INPUT MAXIMUM X VALUE";:INPUT MX
130 IF (MX<0 OR MX>1000000) THEN PRINT@32,"":GOTO 120
140 PRINT@64,"INPUT MAXIMUM Y VALUE";:INPUT MY
150 IF (MY<0 OR MY>1000000) THEN PRINT@64,"":GOTO 140
160 SX=(MX/59): SY=(MY/25)
170 PRINT@96,"COLOR OF POINTS (1-8)";:INPUT C
180 IF (C<1 OR C>8) THEN PRINT@96,"":GOTO 170
190 J=0
200 PRINT@128,"X,Y (END WITH -1,-1";:INPUT X,Y
210 IF (X=-1 AND Y=-1) THEN 290
220 IF (X<0 OR X>MX) THEN 240
230 IF (Y>=0 AND Y<=MY) THEN 280
240 PRINT@480,"INVALID X,Y - TRY AGAIN";
250 FOR I=0 TO 300: NEXT I
260 PRINT@48O,""
270 PRINT@ 128,"": PRINT: PRINT: PRINT: PRINT: GOTO 200
280 X(J)=X: Y(J)=Y: J=J+1: GOTO 270
290 CLS0: A$="":B$=""
300 FOR I=2 TO 30
310 A$=A$+CHR$(128+1)
320 B$=B$+CHR$(128+4)
330 NEXT I
340 FOR I=2 TO 26
350 IF INT(I/2)=I/2 THEN SET(0,I,0):SET(I,I,0):SET(62,I,0):SET(63,I,0)
360 NEXT I
370 PRINT@1,A$;:PRINT@449,B$;
380 PRINT@480,"X:";SX;"Y:";SY;
390 IF J=0 THEN 470
400 FOR I=0 TO J-1
410 X=X(I): Y=Y(I): XD=(59/MX)*X: YD=(25/MY)*Y
420 IF XD-INT(XD)>.5 THEN XD=XD+1
430 IF YD-INT(YD)>.5 THEN YD=YD+1
440 XD=INT(XD)+2:YD=27-INT(YD) :SET(XD,YD,C)
450 SOUND 100,3
460 NEXT I
470 A$=INKEY$:IF A$="" THEN 470
480 IF A$="C" THEN CLS:GOTO 270
490 GOTO 110