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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5c8c86891defe3dc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-30 10:35:25 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Matthew Heaney" Newsgroups: comp.lang.ada Subject: Re: Newbie Q : Exception handling Date: Fri, 30 Nov 2001 13:39:10 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <3c035fe0.7469961@news.freeserve.net> <3C050DB2.4C327C3D@boeing.com> X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Complaints-To: newsabuse@supernews.com Xref: archiver1.google.com comp.lang.ada:17234 Date: 2001-11-30T13:39:10-05:00 List-Id: "Jeffrey Carter" wrote in message news:3C050DB2.4C327C3D@boeing.com... > Others have suggested adding Skip_Line. This will work, but I generally > advise using Get_Line to input an entire line, then decode it Get, when > the input comes from a human. I agree with this advice completely. It's too easy to forget to call Skip_Line when there's a problem with the input, resulting in an infinite loop. As Jeff suggested, use Get_Line to read in the raw text, and then get the enum value by using the version of Get that reads from a string. This technique also allows you to pass meta-values as input, such as "first" or "last" or "exit", etc.