comp.lang.ada
 help / color / mirror / Atom feed
* how to safely convert from 32 to 16 bits?
@ 2005-06-04 17:23 Sebastian
  2005-06-04 17:53 ` Pascal Obry
  2005-06-05  1:24 ` David C. Hoos, Sr.
  0 siblings, 2 replies; 6+ messages in thread
From: Sebastian @ 2005-06-04 17:23 UTC (permalink / raw)


Hi,

Ho do I convert a larger variable like Integer to an smaller type
without loosing any data?

What I would like to do is:

I have a variable of Integer_32 size, I also know that the value is
always between -180 and 180. I would like to assign that value to a 16
bits Real type.

How can that be done without loosing any data?

regards

/Sebastian



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-06-05  8:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-04 17:23 how to safely convert from 32 to 16 bits? Sebastian
2005-06-04 17:53 ` Pascal Obry
2005-06-04 18:45   ` Robert Klungle
2005-06-05  8:13     ` Pascal Obry
2005-06-05  1:24 ` David C. Hoos, Sr.
2005-06-05  5:03   ` Keith Thompson

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