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,f9957894e0bdf128 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!w1g2000prm.googlegroups.com!not-for-mail From: Martin Newsgroups: comp.lang.ada Subject: Re: How to put 200.0 (is float variable of 32 bits) into an integer sub-type of 10 bits (complete program included) Date: Thu, 15 Jan 2009 12:48:17 -0800 (PST) Organization: http://groups.google.com Message-ID: <9d8c429f-bffa-4d3e-a4c2-2cc207af1baf@w1g2000prm.googlegroups.com> References: be26729d-9458-42fa-8c8c-004ca33b790d@f33g2000vbf.googlegroups.com NNTP-Posting-Host: 81.156.241.243 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1232052498 9541 127.0.0.1 (15 Jan 2009 20:48:18 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 15 Jan 2009 20:48:18 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: w1g2000prm.googlegroups.com; posting-host=81.156.241.243; posting-account=g4n69woAAACHKbpceNrvOhHWViIbdQ9G User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.5) Gecko/2008120121 Firefox/3.0.5,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:3350 Date: 2009-01-15T12:48:17-08:00 List-Id: On Jan 15, 8:15=A0pm, ChristopherL wrote: > How can I be getting the below error message with > "Unchecked_Conversion". > Isn't Unchecked_conversion just suppose to copy bits? [snip] ...of objects of the same size. Here's a clue...Short_integer2 is either 8-bits or 32-bits (assuming x86) but it sure as hell ain't 10. And try and stop "thinking in C". Ada (and other non-C based languages) tend to have different ways of doing things. "When in Rome, do as the Romans" Cheers -- Martin