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,1e8499abed674d1c X-Google-Attributes: gid103376,public From: kst@sd.aonix.com (Keith Thompson) Subject: Re: Examine my code! Date: 1997/04/24 Message-ID: #1/1 X-Deja-AN: 237292143 Sender: news@thomsoft.com (USENET News Admin @flash) X-Nntp-Posting-Host: pulsar References: <01bc49c1$c8c990a0$c47d8ea1@AaBbCcDd> <01bc4d85$4c127b40$f4f582c1@xhv46.dial.pipex.com> Organization: Aonix, San Diego, CA, USA Newsgroups: comp.lang.ada Originator: kst@pulsar Date: 1997-04-24T00:00:00+00:00 List-Id: In <01bc4d85$4c127b40$f4f582c1@xhv46.dial.pipex.com> "Nick Roberts" 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 <*> 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