comp.lang.ada
 help / color / mirror / Atom feed
* Keyboard Polling Solution
@ 2004-02-18 21:37 Me
  2004-02-18 23:10 ` Preben Randhol
  2004-02-20 21:38 ` Warren W. Gay VE3WWG
  0 siblings, 2 replies; 14+ messages in thread
From: Me @ 2004-02-18 21:37 UTC (permalink / raw)


Yes, "Get_Immediate" seems to do the trick.  Thanks for the tip.

Test Example :




with Text_IO;  use Text_IO;

procedure Test is

  My_Char          : CHARACTER := ' ';
  Character_Exists : BOOLEAN   := FALSE;
  Loop_Counter     : INTEGER   := 0;

procedure Take_A_Break is begin put_line ("Taking a break from
polling..."); end Take_A_Break;

begin

  loop
    Loop_Counter := Loop_Counter + 1;
    for X in 1..10000 loop
      Get_Immediate (Item      => My_Char,
                     Available => Character_Exists);
      if (Character_Exists) then
        put_line ("Character entered.  Done.");
        return;
      end if;
    end loop;
    Take_A_Break;
  end loop;

end;





^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2004-03-03 16:20 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-18 21:37 Keyboard Polling Solution Me
2004-02-18 23:10 ` Preben Randhol
2004-02-19  0:30   ` Bruce or Tracy Jacobs
2004-02-19 11:47   ` Marin David Condic
2004-02-19 22:57     ` Bruce or Tracy Jacobs
2004-02-20 12:15       ` Marin David Condic
2004-02-20 20:59         ` Chad R. Meiners
2004-02-22 21:26         ` Bruce or Tracy Jacobs
2004-02-23 10:40           ` Preben Randhol
2004-02-25  0:44             ` Bruce or Tracy Jacobs
2004-02-25  2:05               ` Chad R. Meiners
2004-03-03 16:20                 ` Me
2004-02-20 21:38 ` Warren W. Gay VE3WWG
2004-02-22 21:30   ` Bruce or Tracy Jacobs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox