From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e69fe82e62bfec92 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-10 14:54:58 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!news.moneng.mei.com!sol.ctr.columbia.edu!proto.ida.org!wheeler From: wheeler@ida.org (David Wheeler) Newsgroups: comp.lang.ada Subject: Re: keyboard polling in ADA Date: 10 Mar 1995 22:34:32 GMT Organization: IDA, Alexandria, Virginia Message-ID: <3jqk5o$sr@dmsoproto.ida.org> References: <3jq23r$40r@galaxy.csc.calpoly.edu> NNTP-Posting-Host: oids-3.csed.ida.org X-Newsreader: TIN [version 1.2 PL0] Date: 1995-03-10T22:34:32+00:00 List-Id: Matthew S Low (mlow@galaxy.csc.calpoly.edu) wrote: : I'm sorry, in my last posting for keyboard polling in Ada I forgot to : mention that I am attempting to do this using BSD UNIX. I was also asked : whether I was trying to "do something" while the program looped waiting for : a keystroke, and the answer is yes. I'm beginning to look into the areas of : interrupts and forking tasks in ADA. Any help or suggestions would be : greatly appreciated. There are at least 3 ways I can think of: 1. Use a pragma Convention(...) and call the operating system, presuming that the OS provides a way to poll the keyboard. This is usually easy. 2. Use Ada 95, which has a way to poll the keyboard in Text_IO. 3. Use Ada tasks to implement this. For an example, see the "PDI" example at: http://lglwww.epfl.ch/Ada/Examples/PDI/ This sort of stuff depends on the Ada implementation & OS interface. --- David A. Wheeler Net address: wheeler@ida.org