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,df48dd8ae1b14a7e,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-05 07:30:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!eusc.inter.net!cs.tu-berlin.de!uni-duisburg.de!pschulte From: pschulte@uni-duisburg.de (Philipp Schulte) Newsgroups: comp.lang.ada Subject: read from stdin Date: Fri, 5 Jul 2002 16:28:53 +0200 Organization: Gerhard-Mercator-Universitaet -GH- Duisburg Message-ID: NNTP-Posting-Host: nepomuk.max.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1025879400 15019 134.91.242.42 (5 Jul 2002 14:30:00 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Fri, 5 Jul 2002 14:30:00 +0000 (UTC) User-Agent: slrn/0.9.6.2 (Linux) Xref: archiver1.google.com comp.lang.ada:26873 Date: 2002-07-05T16:28:53+02:00 List-Id: Hello, I have very little knowledge of Ada but I have to use it for some programming exercises at my university. I would like to know how I can accomplish the following: I need to have a loop that runs forever and in every cycle it should check if a key has been pressed and if so some function - depending on the character - has to be called. If no key has been pressed then it should just continue running. The problem is not the loop or the calling of different functions but the reading of the character. Since I am using GNU/Linux I guess I just have to read one character from stdin but how can I do this? Thanks for any hints, Phil