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, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,115cdbb394b3e615 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Wes Groleau Newsgroups: comp.lang.ada Subject: Re: Why can't you create a out of order subtype? Date: Wed, 02 Feb 2005 23:36:35 -0500 Organization: Ain't no organization here! Message-ID: <36do2aF4sooriU1@individual.net> References: <1107301914.648240.237290@g14g2000cwa.googlegroups.com> Reply-To: groleau+news@freeshell.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net eDLNIklH4s7rGUVD4Y2ijwWWR8MXagNjQRhMwfHyO7te6m3fGq User-Agent: Mozilla Thunderbird 1.0 (Macintosh/20041206) X-Accept-Language: en-us, en In-Reply-To: Xref: g2news1.google.com comp.lang.ada:8147 Date: 2005-02-02T23:36:35-05:00 List-Id: Pascal Obry wrote: > I don't think this is good style. The above code use exception for non > exceptional case. It uses exception as a if statement. Definitely something > to avoid. When I was still in the industry, our Ada vendor implemented Text_IO.End_of_File thusly: ... exception when End_Error => return True; end End_Of_File; REALLY irritating when you set the debugger to break on exception in a program that reads lots of text files and like a good boy checks for EOF before reading. -- Wes Groleau A pessimist says the glass is half empty. An optimist says the glass is half full. An engineer says somebody made the glass twice as big as it needed to be.