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-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!news.motzarella.org!motzarella.org!news.motzarella.org!not-for-mail From: Keith Thompson 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: Wed, 21 Jan 2009 17:30:59 -0800 Organization: None to speak of Message-ID: References: <9d8c429f-bffa-4d3e-a4c2-2cc207af1baf@w1g2000prm.googlegroups.com> <8a7769ad-133f-4587-9239-34ce90978aa1@v38g2000yqb.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.eternal-september.org U2FsdGVkX19dLdPMOft5WSrSCWcOXyaM4hSZfAFykakkr4tpZuZqReUIElz/3fYe+C5WEeF/XD0EZEPc+azhXUfNRLHRyuMSTA3j7J1efW39XOiLEyqlkTESHsCTctPdUGACYiUfYXs= X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers NNTP-Posting-Date: Thu, 22 Jan 2009 01:30:59 +0000 (UTC) X-Auth-Sender: U2FsdGVkX1/lIn4Pl7QvDadeKD+s4bqH Cancel-Lock: sha1:PwE/SxN9UooLaUeqzfsBLOLfKyo= sha1:ECZCOIyCD6vKxZ/fM4pvaLmo+Tc= User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (gnu/linux) Xref: g2news1.google.com comp.lang.ada:3475 Date: 2009-01-21T17:30:59-08:00 List-Id: ChristopherL writes: > On Jan 15, 12:48 pm, Martin wrote: >> On Jan 15, 8:15 pm, 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. >> > > When I look at "Short_integer2'Size" with the debugger it shows me 10! That's the size of the type, not the size of an object of the type. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Nokia "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"