comp.lang.ada
 help / color / mirror / Atom feed
From: kst@sd.aonix.com (Keith Thompson)
Subject: Re: Examine my code!
Date: 1997/04/24
Date: 1997-04-24T00:00:00+00:00	[thread overview]
Message-ID: <E961o5.AuL@thomsoft.com> (raw)
In-Reply-To: 01bc4d85$4c127b40$f4f582c1@xhv46.dial.pipex.com


In <01bc4d85$4c127b40$f4f582c1@xhv46.dial.pipex.com> "Nick Roberts" <Nick.Roberts@dial.pipex.com> writes:
> The answer is to use 
> 
>    Get_Line(Command);
> 
> instead of just
> 
>    get(command)
> 
> Reason why: things getting stuck in the buffer.

That's the problem, but it's not the solution.

In the previously posted program, Command is an object of an enumeration
type.  There is no Get_Line procedure for enumeration types (though it
wouldn't be difficult to write one).

Take a look at the original program and consider exactly what happens
if the statement Get(Command) raises an exception.

The solution, of course, is left as an exercise for the student.

(I welcome e-mail feedback from educators on whether this is the right
level of response for this kind of question.)

-- 
Keith Thompson (The_Other_Keith) kst@sd.aonix.com <http://www.aonix.com> <*>
TeleSo^H^H^H^H^H^H Alsy^H^H^H^H Thomson Softw^H^H^H^H^H^H^H^H^H^H^H^H^H Aonix
5040 Shoreham Place, San Diego, CA, USA, 92122-5989
"Humor is such a subjective thing." -- Cartagia




  parent reply	other threads:[~1997-04-24  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <01bc49c1$c8c990a0$c47d8ea1@AaBbCcDd>
     [not found] ` <3355E2D9.243@aonix.com>
1997-04-17  0:00   ` Examine my code! Dale Stanbrough
1997-04-17  0:00   ` No! Gautier
1997-04-17  0:00     ` No! Oliver Kellogg
1997-04-20  0:00 ` Examine my code! Nick Roberts
1997-04-23  0:00   ` Centaury
1997-04-24  0:00   ` Keith Thompson [this message]
1997-04-26  0:00     ` Text input on a console Nick Roberts
1997-04-27  0:00       ` Jerry van Dijk
1997-04-29  0:00 ` Examine my code! Odo Wolbers
replies disabled

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