binder@dosadi.DEC (The Stainless Steel Rat) (09/04/84)
I have TURBO Pascal V1 (soon to be V2) on my Apple ][+, and I've been playing with direct character input from the keyboard so that I can handle such things as the right and left arrows to do funny things. The following code segment is what I've come up with - am I missing something or is there really no orthodox way to do it...? Program Test; Type Str80: string[80]; Var InputString: Str80; Function CharGet: char; Var KeyBuffer: char absolute $E000; CharGet: char; Begin; While not (KeyPressed) do begin; End; CharGet := KeyBuffer; End; { The main body begins here } Begin; InputString := ''; While (CharGet <> #128) do begin; { Mumblefratz, as required } End; End. Cheers, Dick Binder (The Stainless Steel Rat) UUCP: { decvax, allegra, ucbvax... }!decwrl!dec-rhea!dec-dosadi!binder ARPA: binder%dosadi.DEC@decwrl.ARPA Posted Tuesday 4th eptemberO 1984, 09:46 EDT by DOSADI::BINDER