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.2 required=5.0 tests=BAYES_00,FROM_WORDY, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a93f67e375858538 X-Google-Attributes: gid103376,public From: "Nick Roberts" Subject: Re: Different behavior of get_immediate in different OSs Date: 1999/01/29 Message-ID: <78rfcu$k6b$1@plug.news.pipex.net>#1/1 X-Deja-AN: 438215378 References: X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: UUNET WorldCom server (post doesn't reflect views of UUNET WorldCom) Newsgroups: comp.lang.ada Date: 1999-01-29T00:00:00+00:00 List-Id: (Fernando Tricas wanted Get_Immediate to work the same for different OSes.) Unfortunately, this is one of those areas where there are always likely to be discrepancies between Ada implementations, especially when they're targeting significantly different operating systems. If you haven't already, you might try using the Get_Immediate variation which have the Available parameter, since this might (just maybe) work more consistently: I would guess putting this in a loop with a small delay (perhaps 0.2 seconds) should work okay (hardly ideal though). >From the Ada programming FAQ: [If you don't have an Ada 95 compiler but have a POSIX binding,] there is a package using POSIX services that provides non-blocking, keystroke-at-a-time access to the terminal. It is available by FTP in file ftp://ftp.adahome.com/pub/FAQ/inkey.ada Using POSIX instead of Get_Immediate might be a way forward for you - but then, of course, this is a solution that will be confined to implementations where a POSIX binding is available. ------------------------------------------- Nick Roberts -------------------------------------------