comp.lang.ada
 help / color / mirror / Atom feed
From: Matthew Heaney <matthew_heaney@acm.org>
Subject: Re: Weird get_line()
Date: 1999/03/28
Date: 1999-03-28T00:00:00+00:00	[thread overview]
Message-ID: <m3soaptpo9.fsf@mheaney.ni.net> (raw)
In-Reply-To: 7dlbot$co$1@nnrp1.dejanews.com

W1bBle <layabouts@the-giant-sofa.demon.co.uk> 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.










  reply	other threads:[~1999-03-28  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-28  0:00 Weird get_line() W1bBle
1999-03-28  0:00 ` Matthew Heaney [this message]
1999-03-28  0:00   ` W1bBle
1999-03-29  0:00     ` Matthew Heaney
     [not found] <yam7758.1500.1147822784@post.demon.co.uk>
1999-03-30  0:00 ` Matthew Heaney
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox