comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison <dennison@escmail.orl.lmco.com>
Subject: Re: Ada 83 - avoiding unchecked conversions.
Date: 1996/12/02
Date: 1996-12-02T00:00:00+00:00	[thread overview]
Message-ID: <32A311C1.41C67EA6@escmail.orl.lmco.com> (raw)
In-Reply-To: 329C63BC.41C6@lmco.com


Ensco Vendor wrote:
> 
> we have two 16 bit integers which we need to assemble into a single 32
> bit integer (one is high order, the other low order).  We wish to avoid
> unchecked conversion if we can.  Is there a standard accepted way of
> doing this?
> 

Does the target object have to be a 32-bit integer, or does it just have
to be the *size* of a 32-bit integer? Often times folks will back
themselves into a corner where they have to do unchecked conversion
because they didn't choose their data types very well.

Of course, often there is some sort of I/O or system binding that
REQUIRES use of an unnatural data type. In that case, unchecked
conversion is the proper tool for the job. Doing any kind of semantic
calisthenics simply to aviod unchecked conversion is liable to cause
more problems than are solved.

-- 
T.E.D.          
             |  Work - mailto:dennison@escmail.orl.lmco.com  |
             |  Home - mailto:dennison@iag.net               |
             |  URL  - http://www.iag.net/~dennison          |




  parent reply	other threads:[~1996-12-02  0:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-27  0:00 Ada 83 - avoiding unchecked conversions Ensco Vendor
1996-11-27  0:00 ` Robert I. Eachus
1996-11-29  0:00 ` Robert Dewar
1996-12-01  0:00   ` Darel Cullen
1996-11-30  0:00     ` Robert Dewar
1996-12-11  0:00     ` Richard Riehle
1996-12-02  0:00 ` Ted Dennison [this message]
1996-12-10  0:00   ` Matthew Heaney
     [not found] <md5:8B831999BCF200C6E70994BDF6CC529F>
1996-12-11  0:00 ` Chris Sparks (Mr. Ada)
1996-12-11  0:00   ` Matthew Heaney
1996-12-12  0:00     ` Chris Brand
1996-12-13  0:00       ` Stephen Leake
1996-12-14  0:00         ` Robert A Duff
1996-12-14  0:00     ` BGaffney42
1996-12-11  0:00   ` Dewi Daniels
1996-12-12  0:00     ` Richard Kenner
1996-12-17  0:00       ` Eric Miller
1996-12-18  0:00         ` Robert Dewar
1996-12-18  0:00           ` Robert A Duff
1996-12-19  0:00           ` Keith Thompson
1996-12-26  0:00             ` Robert Dewar
1996-12-19  0:00   ` Robert I. Eachus
replies disabled

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