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.3 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,df48dd8ae1b14a7e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-05 07:35:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!fr.usenet-edu.net!usenet-edu.net!enst!enst.fr!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: Re: read from stdin Date: Fri, 5 Jul 2002 16:35:20 +0200 Organization: PVV Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: avanie.enst.fr 1025879703 2067 137.194.161.2 (5 Jul 2002 14:35:03 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Fri, 5 Jul 2002 14:35:03 +0000 (UTC) Return-Path: Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:26874 Date: 2002-07-05T16:35:20+02:00 Philipp Schulte wrote on 05/07/2002 (16:32) : > 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? Check: http://www.tc.umn.edu/~puk/tetris.txt -- Preben Randhol ------------------- http://www.pvv.org/~randhol/ -- �For me, Ada95 puts back the joy in programming.�