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,e759c9142eba3ec1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-02-20 04:15:41 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nx02.iad01.newshosting.com!newshosting.com!elnk-atl-nf1!newsfeed.earthlink.net!stamper.news.atl.earthlink.net!newsread3.news.atl.earthlink.net.POSTED!d9c68f36!not-for-mail Message-ID: <4035FA69.1060301@noplace.com> From: Marin David Condic User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (OEM-HPQ-PRS1C03) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Keyboard Polling Solution References: <4033DB01.2CE34E32@me.org> <4034A229.8080403@noplace.com> <40354027.C7D28149@mchsi.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 20 Feb 2004 12:15:40 GMT NNTP-Posting-Host: 209.165.3.170 X-Complaints-To: abuse@earthlink.net X-Trace: newsread3.news.atl.earthlink.net 1077279340 209.165.3.170 (Fri, 20 Feb 2004 04:15:40 PST) NNTP-Posting-Date: Fri, 20 Feb 2004 04:15:40 PST Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:5687 Date: 2004-02-20T12:15:40+00:00 List-Id: Well, there you go! I have not messed with any keyboard input in so long I'd completely forgotten about that. But yes, that looks like it would do the job. I'd be curious why you want to poll. Usually, one tries to avoid that, but I know I've wanted something going on in the background that might stop when the user hit a key. The usual trick would be to have a task looking at keyboard input with another task doing the background job. Sometimes this wouldn't work with some implementations because the I/O operation didn't flag the task as "blocked", so the background would starve. Then you might want to resort to some kind of polling. MDC Bruce or Tracy Jacobs wrote: > A version of Get_Immediate does this. If there is nothing in the > buffer, it returns > FALSE and lets you continue on. > -- ====================================================================== Marin David Condic I work for: http://www.belcan.com/ My project is: http://www.jsf.mil/NSFrames.htm Send Replies To: m o d c @ a m o g c n i c . r "Face it ladies, its not the dress that makes you look fat. Its the FAT that makes you look fat." -- Al Bundy ======================================================================