comp.lang.ada
 help / color / mirror / Atom feed
From: Keith Thompson <kst@cts.com>
Subject: Re: First time Ada has let me down
Date: 2000/10/24
Date: 2000-10-24T00:00:00+00:00	[thread overview]
Message-ID: <yecaebt334l.fsf@king.cts.com> (raw)
In-Reply-To: 3A46E0A5.6C9EC5FD@telepath.com

Ted Dennison <dennison@telepath.com> writes:
[...]
> "typecasting"? No such thing in Ada. Integer types are convertable to each
> other, but that's a simple operation that generates *no* code (except
> sometimes a range check, which you can disable if you need to). A record rep
> clause does seem a good way to go, but there are probably others.

A conversion from a smaller to a larger signed integer type is likely
to require code to do the sign extension; likewise zero extension for
modular types.  Also, any conversion with differing sizes may require
code to copy the bits from one object to another, though this might be
optimized out depending on how the result is used.  (OTOH, the copying
is often considered part of an assignment, not part of the conversion
itself.)

-- 
Keith Thompson (The_Other_Keith) kst@cts.com  <http://www.ghoti.net/~kst>
San Diego Supercomputer Center           <*>  <http://www.sdsc.edu/~kst>
Welcome to the last year of the 20th century.




  reply	other threads:[~2000-10-24  0:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-25  3:50 First time Ada has let me down Shifty
2000-10-25  0:00 ` Ken Garlington
2000-10-25  0:00   ` Shifty
2000-10-26  4:00     ` Jeff Carter
2000-10-26 14:43       ` Ted Dennison
2000-10-26 17:55         ` tmoran
2000-10-26 17:12       ` Shifty
2000-10-27  1:00         ` Jeff Carter
2000-10-26 22:27       ` Guillaume
2000-10-26 21:49         ` Keith Thompson
2000-10-26 14:36     ` Ted Dennison
2000-10-26 17:55       ` tmoran
2000-10-26 23:08         ` Ted Dennison
2000-10-25  0:00 ` Larry Kilgallen
2000-10-25  0:00   ` Ted Dennison
2000-10-25  0:00     ` Larry Kilgallen
2000-10-25  0:00       ` Ted Dennison
2000-10-25  0:00 ` First time Ada has let me down (recipe) Guillaume
2000-10-26  2:45   ` Mats Weber
2000-10-25  0:00 ` First time Ada has let me down wv12
2000-10-25  0:00   ` Gautier
2000-10-25  0:00   ` Gisle Sælensminde
2000-10-25  0:00   ` Joel Seidman
2000-10-26  6:42   ` tmoran
2000-10-25  4:44 ` Julian Morrison
2000-10-25  4:50 ` Ted Dennison
2000-10-24  0:00   ` Keith Thompson [this message]
2000-10-26  0:00   ` Andreas Schulz
2000-10-26 18:05     ` Alejandro Villanueva
2000-10-26 21:46 ` Tucker Taft
replies disabled

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