1
0
mirror of https://github.com/mbirth/gwbasic.git synced 2024-09-19 16:53:26 +01:00
gwbasic/METEX/BALK.BAS

43 lines
1.5 KiB
QBasic
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

5 FONT$="STANDARD.FON"
10 KEY OFF
20 CLS
30 COLOR 15
40 COMM$="D:\DOS\UTIL\FONTS\LOADFONT <"+FONT$
50 SHELL COMM$
60 OPEN "COM1:1200,N,7,2,RS,CD,DS,CD"AS #2
70 INIT$="D"
80 PRINT#2,INIT$
90 IN$=INPUT$ (14, #2)
100 COLOR 15
110 PRINT IN$
120 PRINT
130 INPUT"Geben Sie einen Mindestwert ein ! >",MIN
140 INPUT"Geben Sie einen Maximalwert ein ! >",MAX
150 PRINT"Danke!"
160 PRINT"W„hlen Sie eine Anzeigemethode !"
170 PRINT"1 f<>r Horizont.(max.80 Einheiten) -->";CHR$(243);CHR$(243);" ";CHR$(242)
180 PRINT"2 f<>r Vertikal (max.22 Einheiten) ------>";CHR$(242)
190 INPUT"Geben Sie eine Zahl ein >",METH
200 IF METH<1 OR METH>2 THEN GOTO 190
210 INPUT "Geben Sie die Anzahl der Einheiten an >",BALK
220 IF BALK<1 THEN 210
230 IF BALK>22 AND METH=2 THEN 210
240 IF BALK>80 AND METH=1 THEN 210
250 REM Fertig mit Eingaben, nun folgen Taten
260 CLS
270 LOCATE 1,1:PRINT#2,INIT$:PRINT INPUT$ (14, #2)
280 DIFF=MAX-MIN
290 DIG=DIFF/BALK
300 X=24:IF METH=2 THEN Y=40 ELSE Y=1
310 FOR Z=1 TO BALK
320 IF Z<=BALK/2 THEN COLOR 2
325 IF Z>((BALK/2)/1.5)+(BALK/2) THEN COLOR 4
326 IF Z>BALK/2 AND Z<=((BALK/2)/1.5)+(BALK/2) THEN COLOR 6
330 LOCATE X,Y:IF METH=2 THEN PRINT CHR$(242);CHR$(242); ELSE PRINT CHR$(243);
340 IF METH=2 THEN X=X-1 ELSE Y=Y+1
350 NEXT Z
360 LOCATE 1,1:COLOR 15:PRINT#2,INIT$:WERT$=INPUT$ (14,#2)
370 WERT=VAL(MID$(WERT$,3,7))
380 XBALK=(WERT/(MAX-MIN))*BALK
390 IF XBALK<1 OR XBALK>BALK THEN LOCATE 23,1:COLOR 15:PRINT"OVERLOAD" ELSE PRINT" "