comp.lang.ada
 help / color / mirror / Atom feed
From: Marin David Condic <mcondic.nospam@acm.org>
Subject: Re: Newbie Questions about Get, Get_Line
Date: Sat, 30 Dec 2000 09:13:22 -0500
Date: 2000-12-30T14:13:44+00:00	[thread overview]
Message-ID: <3A4DED82.C23CDB77@acm.org> (raw)
In-Reply-To: k73r4toon9d6e0oi384t6240d32d7leohc@4ax.com

When do you know that the user input is done? Is it when the user hits
the Enter key terminating the line? If so, it should be pretty
straightforward to use Text_IO.Get_Line. That should discard anything
longer than your string buffer. If the input is shorter than your string,
the Last parameter to Get_Line tells you the last character input. Just
fill the rest of the string with spaces.

MDC

gressett@iglobal.net wrote:

> If the user input is shorter that the string variable, it will be
> padded with blanks.
>
> If the user input is longer than the string variable, the extra
> characters should be thrown away, never to be seen again.

--
======================================================================
Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
Visit my web site at:  http://www.mcondic.com/

    "Giving money and power to Government is like giving whiskey
    and car keys to teenage boys."

        --   P. J. O'Rourke
======================================================================





  reply	other threads:[~2000-12-30 14:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-30  7:33 Newbie Questions about Get, Get_Line gressett
2000-12-30 14:13 ` Marin David Condic [this message]
2000-12-30 17:17   ` Ted Dennison
2000-12-30 17:25     ` Ted Dennison
2000-12-30 22:46     ` Marin David Condic
2000-12-30 23:12       ` Ted Dennison
2000-12-30 14:31 ` Jeff Creem
2000-12-30 17:09 ` Ted Dennison
2000-12-31  8:13   ` gressett
2000-12-31 15:50     ` Larry Kilgallen
2000-12-31 17:03     ` Robert Dewar
2000-12-31 17:47     ` Ted Dennison
2000-12-31 21:07     ` tmoran
2001-01-01  6:12       ` gressett
2001-01-01 17:45         ` Robert Dewar
2001-01-01 17:46         ` Robert Dewar
replies disabled

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