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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,5f764f1f7822ab9c X-Google-Attributes: gid103376,public From: Scott Ingram` Subject: Re: Top 10 Language Constructs (Ada) Date: 2000/07/18 Message-ID: <3974D039.CFCE446A@silver.jhuapl.edu>#1/1 X-Deja-AN: 647957601 Content-Transfer-Encoding: 8bit References: <8kmjja$l5h$1@pollux.ip-plus.net> <3970F56F.F3A70FAD@icdc.com> <01HW.B59982450058903A078EC70C@news.pacbell.net> <39751555.4E40A4A7@lmco.com> <8l21od$mkr@newsserv.vs.dasa.de> <39754435.F4DEA73B@lmco.com> X-Accept-Language: en Content-Type: text/plain; charset=iso-8859-1 X-Complaints-To: usenet@houston.jhuapl.edu X-Trace: houston.jhuapl.edu 963956878 12130 128.244.10.34 (18 Jul 2000 21:47:58 GMT) Organization: Johns Hopkins Applied Physics Lab Mime-Version: 1.0 NNTP-Posting-Date: 18 Jul 2000 21:47:58 GMT Newsgroups: comp.lang.ada Date: 2000-07-18T21:47:58+00:00 List-Id: Bill Brennan wrote: > "Dr. Joachim Schr�er" wrote: > > > > Bill Brennan 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.