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 autolearn=ham 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!news1.google.com!news2.google.com!proxad.net!193.252.118.146.MISMATCH!news.wanadoo.fr!news.wanadoo.fr!not-for-mail Sender: obry@PASCAL Newsgroups: comp.lang.ada Subject: Re: how to safely convert from 32 to 16 bits? References: <6acda821.0506040923.1790561c@posting.google.com> <5JednXDeC-wgaDzfRVn-hQ@adelphia.com> From: Pascal Obry Date: 05 Jun 2005 10:13:00 +0200 Message-ID: Organization: Home - http://www.obry.net User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Date: 05 Jun 2005 10:13:05 CEST NNTP-Posting-Host: 82.120.24.178 X-Trace: 1117959185 news.wanadoo.fr 1235 82.120.24.178:2262 X-Complaints-To: abuse@wanadoo.fr Xref: g2news1.google.com comp.lang.ada:11245 Date: 2005-06-05T10:13:05+02:00 List-Id: "Robert Klungle" writes: > Unless I misread the requestor, I think the following would more direct: > > A : Integer_32; > B : Real_16; > > B := Real_16(A); I see the OP want to convert from Real type to Integer_32 without loosing data. Now it would be nice to know what is meant by "loosing no data" ? How many digits for example ? Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net --| "The best way to travel is by means of imagination" --| --| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595