From: "Robert I. Eachus" <rieachus@comcast.net>
Subject: Re: Interger_io get and Text_io.Get_line
Date: Thu, 16 Oct 2003 23:31:10 GMT
Date: 2003-10-16T23:31:10+00:00 [thread overview]
Message-ID: <3F8F2A30.5010908@comcast.net> (raw)
In-Reply-To: w6Djb.4918$Z_2.407289@news20.bellglobal.com
CheGueVerra wrote:
> Okay, after playing with it some more, I found that if I do this
>
> Put_line("Enter a number");
> Entiers.get(Number, 2);
> Skip_line;
> Put_line("Enter a string");
> Get_Line(TstStr, Last);
> Put_line(TstStr(TstStr'First..Last));
>
>
> then the program runs as I expect it to do, the thing is I don't understand
> why I need a Skip_line for it to work, So if anyone can shed some light on
> that I would appriciate it
The Get for Number reads a number, the Skip_Line reads the End_of_Line
following it. I won't go into all the gory details of how to set reads
from the console to character at a time from line at a time, etc.
Notice that without the fix, entering the number followed on the same
line by the string would work.
--
Robert I. Eachus
"Quality is the Buddha. Quality is scientific reality. Quality is the
goal of Art. It remains to work these concepts into a practical,
down-to-earth context, and for this there is nothing more practical or
down-to-earth than what I have been talking about all along...the repair
of an old motorcycle." -- from Zen and the Art of Motorcycle
Maintenance by Robert Pirsig
next prev parent reply other threads:[~2003-10-16 23:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-16 20:12 Interger_io get and Text_io.Get_line CheGueVerra
2003-10-16 20:22 ` CheGueVerra
2003-10-16 23:31 ` Robert I. Eachus [this message]
2003-10-17 1:01 ` Jeffrey Carter
2003-10-17 1:15 ` CheGueVerra
2003-10-17 5:08 ` Anders Wirzenius
2003-10-17 5:59 ` Anders Wirzenius
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox