From: Scott Ingram` <scott@silver.jhuapl.edu>
Subject: Re: Top 10 Language Constructs (Ada)
Date: 2000/07/18
Date: 2000-07-18T21:47:58+00:00 [thread overview]
Message-ID: <3974D039.CFCE446A@silver.jhuapl.edu> (raw)
In-Reply-To: 39754435.F4DEA73B@lmco.com
Bill Brennan wrote:
> "Dr. Joachim Schr�er" wrote:
> >
> > Bill Brennan <william.c.brennan@lmco.com> schrieb in im Newsbeitrag:
> > > type Plasma_Volts_Type is
> > > delta 2#000.0_0000_0000_0001# -- approx 0.00012207
> > > range -2#100.0_0000_0000_0000# .. -- -4
> > > 2#011.1_1111_1111_1111#; -- approx 3.99987793
> > >
> > > for Plasma_Volts_Type'Size use 16;
> > >
> >
> > What about this version:
> >
> > type Plasma_Volts_Type is delta 2.0**(-13) range -4.0 .. 4.0 - 2.0**(-13);
> > for Plasma_Volts_Type'Size use 16;
>
> While your version is more concise and arguably easier to read
> (all right, it *is* easier to read ;-)), I chose my representation,
> long-winded as it is, to demonstrate that the 'First and 'Last were
> chosen
> to be the most extreme values in the possible range of this 16-bit
> representation.
> In fact, I had to prove this to myself on paper first, by mapping out
> the bits,
> and just decided to transfer my notes to Ada. If this information isn't
> particularly useful to demonstrate in the code, then the concise version
> wins for sure.
>
> Isn't it nice that we have the choice, and that both options convey the
> information with slightly differing emphasies?
> (Are there other interesting representations?)
>
> -- Bill Brennan
I found all three eminently readable...after looking at C and Perl all
day almost ANY Ada spangs into my consciouness without effort!
And having the options to write it in a way that makes sense to the
author while typically being readable... As the only Ada user in my
shop, I find that my programmers have no trouble reading my proggies
even though none of know Ada.
next prev parent reply other threads:[~2000-07-18 0:00 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-07-14 0:00 Top 10 Language Constructs (Ada) Bruno Gustavs
2000-07-14 0:00 ` Samuel T. Harris
2000-07-15 0:00 ` Simon Wright
2000-07-18 0:00 ` Nick Keighley
2000-07-14 0:00 ` David Kristola
2000-07-14 0:00 ` Andrew Hately
2000-07-15 0:00 ` David Botton
2000-07-15 0:00 ` Marc A. Criley
2000-07-16 0:00 ` David Botton
2000-07-18 0:00 ` David Kristola
2000-07-18 0:00 ` Scott Ingram`
2000-07-18 0:00 ` Bill Brennan
2000-07-18 0:00 ` Dr. Joachim Schr�er
2000-07-19 0:00 ` Bill Brennan
2000-07-18 0:00 ` Scott Ingram` [this message]
2000-07-21 0:00 ` Keith Thompson
2000-07-25 0:00 ` Keith Thompson
2000-07-25 0:00 ` Dr. Joachim Schr�er
2000-07-25 0:00 ` Florian Weimer
2000-07-26 0:00 ` David Kristola
2000-07-19 0:00 ` David Kristola
2000-07-18 0:00 ` Stefan Skoglund
2000-07-24 0:00 ` Richard Riehle
2000-07-26 0:00 ` The Ada type model (was Re: Top 10 Language Constructs (Ada)) Marc A. Criley
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox