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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f93adbf272b6f27,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!not-for-mail From: di98mase@hotmail.com (Sebastian) Newsgroups: comp.lang.ada Subject: how to safely convert from 32 to 16 bits? Date: 4 Jun 2005 10:23:28 -0700 Organization: http://groups.google.com Message-ID: <6acda821.0506040923.1790561c@posting.google.com> NNTP-Posting-Host: 139.58.232.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1117905808 14454 127.0.0.1 (4 Jun 2005 17:23:28 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 4 Jun 2005 17:23:28 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:11238 Date: 2005-06-04T10:23:28-07:00 List-Id: 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