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=-0.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FREEMAIL_REPLY,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e584b80ec129f1ce X-Google-Attributes: gid103376,public From: "Nick Roberts" Subject: Re: Exception handling problem Date: 2000/03/07 Message-ID: <38c463dd@eeyore.callnetuk.com>#1/1 X-Deja-AN: 594075036 References: <38C34C24.3955@gmx.net> X-Original-NNTP-Posting-Host: da130d96.dialup.callnetuk.com X-Trace: 7 Mar 2000 02:05:17 GMT, da130d96.dialup.callnetuk.com X-MSMail-Priority: Normal X-Priority: 3 Newsgroups: comp.lang.ada X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Date: 2000-03-07T00:00:00+00:00 List-Id: I have a feeling others will answer this one better than me. The really short version of the answer to your conundrum is: the letter that causes the first exception is never removed from the input queue, so it just goes on causing exceptions forever. This is not a bug in GNAT; GNAT is following the Ada standard precisely. Some have suggested it's a fault in the Ada standard, but that's not an argument I want to dive into (as it's assuredly a muddy issue); for details search Deja News within comp.lang.ada on ... hmmm ... "Get" maybe. The (likely) solution to your problem, unfortunately, is to accumulate the user's input into a string; this is easily done, up to the end of the current input line, using Get_Line. Having done this, you can then check (parse) the string, either resulting in a valid number (or whatever), or outputting an error message and looping round for another input line. This technique has the potential advantage of allowing you to devise your own special syntax (e.g. allowing "." as a shorthand for 'current line'). Wishing you god-like powers in your Ada programming, -- Nick Roberts http://www.adapower.com/lab/adaos "Amun-Ra" wrote in message news:38C34C24.3955@gmx.net... > Hi all! > > I have a big problem handling exceptions with Ada95 using GNAT. > ...