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,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cf9dfbced2c99710 X-Google-Attributes: gid103376,public From: Markus Kuhn Subject: Re: Buffering inputted characters Date: 1998/06/20 Message-ID: <358BEFB0.666D2636@cl.cam.ac.uk>#1/1 X-Deja-AN: 364514335 Content-Transfer-Encoding: 7bit References: <898358420.19245.0.nnrp-08.c2de5e53@news.demon.co.uk> Content-Type: text/plain; charset=us-ascii Organization: Cambridge University, Computer Laboratory Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-06-20T00:00:00+00:00 List-Id: > What I would like to know is how I can get a program to look for > (keyboard) input. It would check to see if there has been any, and carry > out appropriate actions depending on the input. How can this be done > *without holding up the rest of the program?* Have you tried putting a call to Ada.Text_IO.Get_Immediate into a task of its own that communicates any key presses via entry calls to the main task of your game? In case tasks have not yet been covered in your course, I highly recommend you to read the tasks section of your Ada textbook before you proceed. Tasks are an incredibly useful tool for video game programming in Ada. Markus -- Markus G. Kuhn, Security Group, Computer Lab, Cambridge University, UK email: mkuhn at acm.org, home page: