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,fabdf3894cea2f63 X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: Re: Weird get_line() Date: 1999/03/28 Message-ID: #1/1 X-Deja-AN: 460074735 References: <7dlbot$co$1@nnrp1.dejanews.com> NNTP-Posting-Date: Sun, 28 Mar 1999 10:45:46 PDT Newsgroups: comp.lang.ada Date: 1999-03-28T00:00:00+00:00 List-Id: W1bBle writes: > I have an extremely strange problem with get_line() > > In the main part of the program, it functions as normal. However, when it is > used inside a loop (like you would need to implement a basic text menu on > your terminal) the program appears to "skip" over the get_line() statement, > removing the possibility of user input, which kind of defeats the purpose of > having a menu. get() suffers no such problems. Any ideas? I'm using the > gnat system. Make sure your line buffer is larger than (and not just equal) the user's input. Remember that the buffer holds both the actual data entered by the user, and an indication of whether the entire line has been consumed. See my response to the post "Sequential???" on 23 Jan 99 for an explanation of how Get_Line works.