home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tiger Disk 14
/
Tiger_Disk_014_19xx_Tiger-Crew-Disk_de_Side_A.d64
/
input-routine
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
3KB
|
111 lines
10 poke53281,11:poke53280,11:poke646,15
20 print"[147] input-routine"
30 print" von till zieger
40 [129]t[178]1[164]2000:[130]:[137]880
50 [137] 450
60 :
70 [143] input-routine
80 [143] -------------
90 :
100 [151] 198,0:ys[178][194](211):yc[178]ys
110 [139] [195](y$)[177][178]yl [167] [137] 130
120 y$[178]y$[170]" ":[137] 110
130 [151] 211,ys:[153] y$;:[151] 211,yc
140 [151] 204,0
150 [161] yt$:[139] yt$[178]""[167] [137] 150
160 [151] 204,1
170 yt[178][198](yt$):yc[178][194](211)
180 [139] yt[178]13 [167] [151] 211,ys:[153] y$:[142]
190 [139] yt[178]29 [167] [137] 350
200 [139] yt[178]157 [167] [137] 370
210 [139] yt[178]147 [167] [151] 211,ys:y$[178]" ":yc[178]ys:[137] 110
220 [139] yt[178]148 [167] [137] 390
230 [139] yt[178]20 [167] [137] 420
240 [139] yt[178]19 [167] yc[178]ys:[137] 130
250 [145] yf [137] 290,310,330
260 y$[178][200](y$,yc[171]ys)[170]yt$[170][201](y$,ys[170]yl[171]yc[171]1):[153] yt$;
270 [139] [194](211)[177]ys[171]1[170]yl [167] [153] [199](157);
280 [137] 140
290 [139] yt[179]48 [176] yt[177]57 [167] [137] 140
300 [137] 260
310 [139] yt[179]32 [176](yt[177]32 [175] yt[179]40)[176] yt[177]57 [167] [137] 140
320 [137] 260
330 [139] yt[179]32 [176](yt[177]95 [175] yt[179]193)[176] yt[177]218 [167] [137] 140
340 [137] 260
350 [139] [194](211)[177]ys[171]2[170]yl [167] [137] 140
360 yc[178]yc[170]1:[137] 130
370 [139] [194](211)[178]ys [167] [137] 140
380 yc[178]yc[171]1:[137] 130
390 [139] yf[178]1 [167] [137] 140
400 yc[178][194](211):y$[178][200](y$,yc[171]ys)[170]" "[170][202](y$,yc[171]ys[170]1,ys[170]yl[171]yc[171]1)
410 [151] 211,ys:[153] y$;:[151] 211,yc:[137] 140
420 yc[178][194](211):y$[178][200](y$,yc[171]ys)[170][201](y$,ys[170]yl[171]yc[171]1)[170]" "
430 [151] 211,ys:[153] y$;:[151] 211,yc:[137] 140
440 :
450 [143] hauptprogramm
460 [143] -------------
470 :
480 [153] [199](147);[199](14)
490 [153]" right$nput-peekeispiel"
500 [153]" ==============":[153]
510 [153]"valingaben"
520 [153]"--------":[153]
530 [153]"numerisch: ";:yl[178]5:yf[178]1:y$[178]nu$:[141] 60:nu$[178]y$
540 [153]
550 [153]"kaufmaennisch: ";:yl[178]10:yf[178]2:y$[178]ka$:[141] 60:ka$[178]y$
560 [153]
570 [153]"alphanumerisch: ";:yl[178]15:yf[178]3:y$[178]al$:[141] 60:al$[178]y$
580 [153]:[153]
590 [153]"atnusgaben"
600 [153]"--------"
610 [153] nu$
620 [153] ka$
630 [153] al$
640 [153]"nochmal zeigen ?"
650 [161]xx$:[139]xx$[178]""[167]650
660 [139]xx$[178]"j" [137] 450
670 [128]
680 :
690 [153]"loadexterne variablen
700 print"-----------------
710 [153]"yl = maximallaenge der variable
720 print" (1 bis 40)
730 [153]"yf = art der eingabe:
740 print" 1 - numerisch (ziffern 0 bis 9)
750 [153]" 2 - kaufmaennisch (ziffern,
760 print" math. zeichen, leerzeichen)
770 [153]" 3 - alphanumerisch (wie 2 + buch-
780 print" staben und sonderzeichen)
790 [153]"y$ = ein-/ausgabe-variable
800 poke198,0:wait198,1:poke198,0
810 print"[147]interne variablen
820 [153]"-----------------
830 print"ys = anfangsposition cursor
840 [153]"yc = aktuelle cursorposition
850 print"yt$= gedrueckte taste
860 [153]"yt = ascii der gedrueckten taste
870 poke198,0:wait198,1:poke198,0:goto50
880 print"[147]erlaeuterungen
890 [153]"--------------
900 print"die input-routine ermoeglicht eine
910 [153]"fehlerfreie eingabe ohne gefahr
920 print"der maskenzerstoerung, indem ein
930 [153]"eingabefenster mit der laenge yl
940 print"mit folgenden eigenschaften
950 [153]"erzeugt wird:
960 print"
970 [153]"- sofortige pruefung auf zulaes-
980 print" sigkeit der gedrueckten taste
990 [153]" in abhaengigkeit von yf.
1000 print"- freie cursorbewegungen innerhalb
1010 [153]" des fensters.
1020 print"- home: cursor an linken rand
1030 [153]" setzen.
1040 print"- clr: loeschen des gesamten
1050 [153]" fensters.
1060 print"- del: loeschen ab cursorposition.
1070 [153]"- inst: einfuegen von leerzeichen
1080 print" ab cursorposition (nicht bei
1090 [153]" numerischer eingabe).
1100 poke198,0:wait198,1:poke198,0:goto690