<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Tue, 04 Sep 1984 06:42:14-PDT (Tue)
From   : hplabs!hpda!fortune!amd!decwrl!dec-rhea!dec-dosadi!binder@UCB-VAX.ARPA
Subject: Query re: TURBO Pascal character input

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
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>