home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er 1990 February
/
64er_Magazin_90-02_1990_Markt__Technik_de_Side_A.d64
/
input
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
2KB
|
41 lines
1 poke45,peek(174):poke46,peek(175):clr
10 goto 1000
110 rem von jens j.lauterbach
120 rem 6200 wiesbaden
150 rem ei$ : vorgabe- und eingabestring
160 rem gl : maximal erlaubte eingabelaenge
170 rem fl : laenge des eingabefeldes
180 rem
190 rem sp$ muss mindestens gl space enthalten !!!
200 ei$=left$(ei$+sp$,gl)
210 cs=pos(0):qq=fl+2
220 poke 198,0
230 p=1:pz=1
240 poke 211,cs
250 print mid$(left$(ei$,p-1)+""+mid$(ei$,p,1)+"[146]"+mid$(ei$,p+1),pz,qq);
260 wait 198,255:get a$:rem auf taste warten
270 if a$=chr$(13) then poke 211,cs:print left$(ei$,fl):return
280 if a$="" goto 230
290 if a$="[147]" then ei$=left$(sp$,gl):goto 240
300 if a$="" goto 440
310 if a$="[157]" goto 360
320 if a$<>chr$(20) goto 370
330 if p=1 goto 260
340 if p=2 then ei$=mid$(ei$,2)+" ":goto 240
350 ei$=left$(ei$,p-2)+mid$(ei$,p)+" "
360 p=p-1-(p=1):pz=pz-1-(p=>pz):goto 240
370 if a$<>chr$(148) goto 400
380 if right$(ei$,1)<>" " goto 260
390 ei$=left$(ei$,p-1)+" "+mid$(ei$,p,gl-p):goto 240
400 if a$<" " goto 260
410 if a$<chr$(128) goto 430
420 if a$<chr$(160) goto 260
430 ei$=left$(ei$,p-1)+a$+mid$(ei$,p+1)
440 p=p+1+(p=gl):pz=pz+1+(p-pz<fl):goto 240
1000 rem --- steuerprogramm ---
1010 sp$=" "
1020 ei$="[214]orgabestring":gl=50:fl=20:gosub 100
1030 print"[211]ie gaben ein :"
1040 print ei$
1050 end