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 >
Commodore BASIC  |  2022-10-26  |  2KB  |  41 lines

  1. 1 poke45,peek(174):poke46,peek(175):clr
  2. 10 goto 1000
  3. 110 rem von jens j.lauterbach
  4. 120 rem     6200 wiesbaden
  5. 150 rem ei$ : vorgabe- und eingabestring
  6. 160 rem gl  : maximal erlaubte eingabelaenge
  7. 170 rem fl  : laenge des eingabefeldes
  8. 180 rem
  9. 190 rem sp$ muss mindestens gl space enthalten !!!
  10. 200 ei$=left$(ei$+sp$,gl)
  11. 210 cs=pos(0):qq=fl+2
  12. 220 poke 198,0
  13. 230 p=1:pz=1
  14. 240 poke 211,cs
  15. 250 print mid$(left$(ei$,p-1)+""+mid$(ei$,p,1)+"[146]"+mid$(ei$,p+1),pz,qq);
  16. 260 wait 198,255:get a$:rem auf taste warten
  17. 270 if a$=chr$(13) then poke 211,cs:print left$(ei$,fl):return
  18. 280 if a$="" goto 230
  19. 290 if a$="[147]" then ei$=left$(sp$,gl):goto 240
  20. 300 if a$="" goto 440
  21. 310 if a$="[157]" goto 360
  22. 320 if a$<>chr$(20) goto 370
  23. 330 if p=1 goto 260
  24. 340 if p=2 then ei$=mid$(ei$,2)+" ":goto 240
  25. 350 ei$=left$(ei$,p-2)+mid$(ei$,p)+" "
  26. 360 p=p-1-(p=1):pz=pz-1-(p=>pz):goto 240
  27. 370 if a$<>chr$(148) goto 400
  28. 380 if right$(ei$,1)<>" " goto 260
  29. 390 ei$=left$(ei$,p-1)+" "+mid$(ei$,p,gl-p):goto 240
  30. 400 if a$<" " goto 260
  31. 410 if a$<chr$(128) goto 430
  32. 420 if a$<chr$(160) goto 260
  33. 430 ei$=left$(ei$,p-1)+a$+mid$(ei$,p+1)
  34. 440 p=p+1+(p=gl):pz=pz+1+(p-pz<fl):goto 240
  35. 1000 rem --- steuerprogramm ---
  36. 1010 sp$="                                        "
  37. 1020 ei$="[214]orgabestring":gl=50:fl=20:gosub 100
  38. 1030 print"[211]ie gaben ein :"
  39. 1040 print ei$
  40. 1050 end
  41.