Re: Typing in Ada
From: Dennis Lee Bieber (wlfraed_at_ix.netcom.com)
Date: 06/01/04
- Next message: Hyman Rosen: "Re: Typing in Ada"
- Previous message: Robert I. Eachus: "Re: Why I like Ada"
- In reply to: Hyman Rosen: "Re: Typing in Ada"
- Next in thread: Wes Groleau: "Re: Typing in Ada"
- Reply:(deleted message) Wes Groleau: "Re: Typing in Ada"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 01 Jun 2004 04:03:43 GMT
On Tue, 01 Jun 2004 02:36:53 GMT, Hyman Rosen <hyrosen@mail.com>
declaimed the following in comp.lang.ada:
> limited. In a real program that does something useful, what kinds
> of things do you want to count up to 100 but not to 101? To 200
Just off the top of my head... 0..100 covers the range, in
Celsius, at standard pressure, between freezing and boiling of water.
Perhaps you have some application making temperature readings wherein
any temp below freezing, or above boiling (superheated steam?) is an
exception condition.
Angular measurements: 0..360 (though likely you'd want some
floating point type with an upper bound one "step" below 360.0)
The fuel tank of your car probably is spec'd with a capacity in
the range of 12 to 20 gallons (depending on size of the vehicle). A
strict EPA system may consider "overfilling" the tank to be an exception
(the manual for my Vespa explicitly warns against overfilling -- not
because heat expansion could cause a spill, but because it could force
liquid fuel to back up into the vapor canister).
I'll concede that all the above might be better served with
floats, but Ada allows /that/ to be done.
Integer counts? Hmmm, machinery to fill pill boxes? If the
"count sensor" exceeds the count before the rest of the mechanism has
shifted boxes, it should perhaps result in an exception to kick the
overfilled box to the side?
--
> ============================================================== <
> wlfraed@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
> wulfraed@dm.net | Bestiaria Support Staff <
> ============================================================== <
> Home Page: <http://www.dm.net/~wulfraed/> <
> Overflow Page: <http://wlfraed.home.netcom.com/> <
- Next message: Hyman Rosen: "Re: Typing in Ada"
- Previous message: Robert I. Eachus: "Re: Why I like Ada"
- In reply to: Hyman Rosen: "Re: Typing in Ada"
- Next in thread: Wes Groleau: "Re: Typing in Ada"
- Reply:(deleted message) Wes Groleau: "Re: Typing in Ada"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|