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=-0.3 required=5.0 tests=BAYES_00,HK_RANDOM_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,463c997594f91391 X-Google-Attributes: gid103376,public From: bglbv@my-dejanews.com Subject: Re: How to get a character? Date: 1999/04/10 Message-ID: <87k8vkag6f.fsf@bglbv.my-dejanews.com>#1/1 X-Deja-AN: 464847187 References: <370EE07D.67C71458@dave-world.net> X-Complaints-To: abuse@freeuk.net X-Trace: nnrp2.clara.net 923766758 212.126.148.137 (Sat, 10 Apr 1999 18:52:38 BST) NNTP-Posting-Date: Sat, 10 Apr 1999 18:52:38 BST Newsgroups: comp.lang.ada Date: 1999-04-10T00:00:00+00:00 List-Id: Matthew Heaney writes: > Ben Barth writes: > > > I was wondering if there was a way to get a character in Ada from the > > user such as the getchar() function that can be used in C. > > Try Get_Line. Don't you mean Get_Immediate? > > I'm trying to add a stop after displaying some information to the > > screen so the user can press any key to continue with the program. > > Yup. Use Get_Line. Nope. With Get_Line the "any key" had better be labelled "return" or "enter". > > I used the Text_IO.Get() function but that didn't seem to work very > > well. > > That function only returns only readable characters, and keeps consuming > the line terminator until it finds one. In this case, this is not the > behavior you want. Correct.