Re: Typing in Ada

From: Dennis Lee Bieber (wlfraed_at_ix.netcom.com)
Date: 06/01/04


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/> <



Relevant Pages

  • Re: First snow
    ... while boiling and freezing water were easy to reproduce ... the meter was originally set to a forty ... and repinned the meter as the distance ...
    (rec.arts.sf.composition)
  • Re: tossing pancakes
    ... 100F is SUPPOSED to be human body temperature. ... I think the common conception is that Fahrenheit is also based on freezing and boiling of fresh water, but that Herr Fahrenheit wanted those to temperatures to be positive. ...
    (rec.arts.sf.composition)
  • Re: GRidlock - How far has RTD gone?
    ... How about 0 to 100 based on the boiling and freezing points ... heat distilled water above 100 C under 1 Atm without it boiling. ... brine at one end and human blood at the other). ...
    (rec.arts.drwho)
  • Re: GRidlock - How far has RTD gone?
    ... You're against the metric system because computers tend to use it more ... let's think of a really rational scale of measuring ... How about 0 to 100 based on the boiling and freezing points of ...
    (rec.arts.drwho)
  • 7.31.UD8, Exception Recursion while handling: MT_EX_OS, Context: mem
    ... Can someone explain me where I can check to find why my DB on SCO ... OpenServer 5.0.7 is freezing, giving me the message "Exception ...
    (comp.databases.informix)