home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / C64Software / GRAPH-IT (.txt) < prev    next >
Commodore BASIC  |  2019-04-13  |  896b  |  33 lines

  1. 10 REM GRAPHIT BY JIM LOOMIS
  2. 20 POKE53280,PEEK(53281):PRINT"[147]"
  3. 30 INPUT"[200]OW MANY ITEMS TO GRAPH (1-250)";X
  4. 35 IFX>250THENPRINT"[212]OO MANY!":GOTO30
  5. 40 DIMA$(X),Y(X),BB(X):W=0
  6. 50 FORT=1TOX:PRINT"[206]AME";T;:INPUTA$(T):INPUT"[211]IZE";Y(T):W=W+Y(T):NEXT
  7. 55 TP=W:TP$="(TOTAL)":INPUT"[212]ITLE";L$
  8. 60 PRINT"100% =  ";W:INPUT"[145]";W:IFTP<>WTHENTP$=""
  9. 65 INPUT"[196]ISPLAY TO P[146]RINTER OR S[146]CREEN   S[157][157][157]";D$:IFD$<>"P"ANDD$<>"S"THEN65
  10. 70 D=3:C=39:IFD$="P"THEND=4:C=79
  11. 80 GOSUB200:GOSUB250:OPEND,D,7:CMDD:PRINTL$:FORB=1TOC/2:PRINT" -";:NEXT
  12. 85 PRINT:PRINT"100 % =";W;TP$
  13. 90 FORT=1TOX:PRINT:PRINTA$(T):GOSUB300:NEXT:PRINT#D:CLOSED
  14. 95 PRINT"  [211][212][207][208] TO QUIT, [210][197][212][213][210][206] FOR ANOTHER."
  15. 100 FORQ=0TO1:GETQ$:IFQ$=""THENQ=0
  16. 110 NEXT:RUN
  17. 140 REM
  18. 150 REM ** FIND LONGEST LINE **
  19. 200 FORZ=1TOX:IFP<Y(Z)THENP=Y(Z)
  20. 210 NEXT:RETURN
  21. 230 REM
  22. 240 REM ** PROPORTION LINES **
  23. 250 FORZ=1TOX:L=Y(Z)/W:BB(Z)=L*C:NEXT
  24. 260 IFD=3THENPRINT"[147]";
  25. 270 RETURN
  26. 280 REM
  27. 290 REM ** DISPLAY LINES **
  28. 300 IFBB(T)<1THENPRINT:GOTO320
  29. 310 FORB=1TOBB(T):PRINT"=";:NEXT:PRINT
  30. 320 PRINTY(T);"=";INT((Y(T)/W*1000)+.5)/10;"PERCENT"
  31. 330 RETURN
  32. 400 END
  33.