comp.lang.ada
 help / color / mirror / Atom feed
From: Wes Groleau <groleau+news@freeshell.org>
Subject: Re: Why can't you create a out of order subtype?
Date: Wed, 02 Feb 2005 23:36:35 -0500
Date: 2005-02-02T23:36:35-05:00	[thread overview]
Message-ID: <36do2aF4sooriU1@individual.net> (raw)
In-Reply-To: <uwttqaj9l.fsf@obry.org>

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.



  parent reply	other threads:[~2005-02-03  4:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-01 23:51 Why can't you create a out of order subtype? brett_gengler
2005-02-02  0:24 ` Jeffrey Carter
2005-02-02 17:55   ` Marius Amado Alves
2005-02-02 18:50     ` Pascal Obry
2005-02-02 20:22       ` Marius Amado Alves
2005-02-03  4:36       ` Wes Groleau [this message]
2005-02-03 12:59         ` Marius Amado Alves
2005-02-04  3:42           ` Wes Groleau
2005-02-02 19:35     ` Martin Dowie
2005-02-02 20:35       ` Marius Amado Alves
2005-02-02 21:18         ` Martin Dowie
2005-02-03 19:40       ` Robert A Duff
2005-02-03 20:22         ` Marius Amado Alves
2005-02-03 22:05           ` Robert A Duff
2005-02-04  6:49           ` Martin Dowie
2005-02-02 22:26 ` Georg Bauhaus
2005-02-03 23:09 ` Robert A Duff
replies disabled

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