comp.lang.ada
 help / color / mirror / Atom feed
From: Keith Thompson <kst-u@mib.org>
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
Date: 2009-01-21T17:30:59-08:00	[thread overview]
Message-ID: <lny6x4ktyk.fsf@nuthaus.mib.org> (raw)
In-Reply-To: 8a7769ad-133f-4587-9239-34ce90978aa1@v38g2000yqb.googlegroups.com

ChristopherL <clusardi2k@aol.com> writes:
> On Jan 15, 12:48 pm, Martin <martin.do...@btopenworld.com> wrote:
>> On Jan 15, 8:15 pm, ChristopherL <clusard...@aol.com> 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  <http://www.ghoti.net/~kst>
Nokia
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"



  parent reply	other threads:[~2009-01-22  1:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-15 20:48 How to put 200.0 (is float variable of 32 bits) into an integer sub-type of 10 bits (complete program included) Martin
     [not found] ` <8a7769ad-133f-4587-9239-34ce90978aa1@v38g2000yqb.googlegroups.com>
2009-01-22  1:30   ` Keith Thompson [this message]
     [not found] <407ae64d-3cb3-4310-b59e-f1bbae9910a5@t39g2000prh.googlegroups.com>
2009-01-14  1:33 ` How to put 200 into an integer sub-type of 16 bits (code included) Brian Drummond
2009-01-14 21:09   ` sjw
2009-01-15 14:44     ` Brian Drummond
     [not found]       ` <3f1f2f67-5d69-4baf-8e8c-0d2b5f68475f@p36g2000prp.googlegroups.com>
2009-01-15 16:36         ` How to put 200.0 (is float variable of 32 bits) into an integer sub-type of 10 bits (complete program included) Adam Beneschan
     [not found]         ` <8e64f509-f6fe-4d86-ae1a-fe0b1c88555a@v5g2000pre.googlegroups.com>
2009-01-15 17:09           ` christoph.grein
2009-01-15 17:17             ` Adam Beneschan
2009-01-15 17:29               ` Georg Bauhaus
     [not found]                 ` <09b4a056-688d-49c8-b935-fa0b30f1ae84@w1g2000prk.googlegroups.com>
2009-01-15 18:40                   ` Mike H
     [not found]                     ` <be26729d-9458-42fa-8c8c-004ca33b790d@f33g2000vbf.googlegroups.com>
2009-01-15 20:57                       ` Niklas Holsti
     [not found]                 ` <97231951-54a0-4df7-bb73-04261b34287f@e6g2000vbe.googlegroups.com>
2009-01-16  3:17                   ` Steve D
     [not found]             ` <a61abb30-bc60-4d13-b298-f369ddc8f741@z6g2000pre.googlegroups.com>
2009-01-15 18:15               ` Martin
2009-01-15 18:34               ` Stuart
2009-01-15 17:23           ` Georg Bauhaus
     [not found]         ` <d3b7ad53-af51-4ac5-9167-7cb99e61b2b1@v5g2000pre.googlegroups.com>
2009-01-15 17:50           ` Stuart
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox