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,463c997594f91391 X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: Re: How to get a character? Date: 1999/04/10 Message-ID: #1/1 X-Deja-AN: 464743672 References: <370EE07D.67C71458@dave-world.net> NNTP-Posting-Date: Sat, 10 Apr 1999 03:03:41 PDT Newsgroups: comp.lang.ada Date: 1999-04-10T00:00:00+00:00 List-Id: 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. > 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. Put_Line ("Hit any key to continue"); declare Line : String (1 .. 20); Last : Natural; begin Get_Line (Line, Last); end; > 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. I made a post on this topic a week or two ago, with the title "weird get_line". You can look it up at DejaNews. > I was also wondering if there was a way to format output to the screen > ala C which uses "\t" for a tab. Try ASCII.HT. Set_Column (Set_Col?) might be better, though.