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=-2.5 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, STOX_REPLY_TYPE autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f93adbf272b6f27 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news2.google.com!proxad.net!usenet-fr.net!news.enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: "David C. Hoos, Sr." Newsgroups: comp.lang.ada Subject: Re: how to safely convert from 32 to 16 bits? Date: Sat, 4 Jun 2005 20:24:01 -0500 Organization: Cuivre, Argent, Or Message-ID: References: <6acda821.0506040923.1790561c@posting.google.com> NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Trace: melchior.cuivre.fr.eu.org 1117934670 41014 212.85.156.195 (5 Jun 2005 01:24:30 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Sun, 5 Jun 2005 01:24:30 +0000 (UTC) Cc: comp.lang.ada@ada-france.org To: "Sebastian" Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: g2news1.google.com comp.lang.ada:11242 Date: 2005-06-04T20:24:01-05:00 What compiler and hardware are you using that has a 16-bit Real type? ----- Original Message ----- From: "Sebastian" Newsgroups: comp.lang.ada To: Sent: June 04, 2005 12:23 PM Subject: how to safely convert from 32 to 16 bits? > 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 > _______________________________________________ > comp.lang.ada mailing list > comp.lang.ada@ada-france.org > http://www.ada-france.org/mailman/listinfo/comp.lang.ada > >