comp.lang.ada
 help / color / mirror / Atom feed
From: Keith Thompson <kst-u@mib.org>
Subject: Re: What is the best way to convert Integer to Short_Short_Integer?
Date: Tue, 22 Jun 2010 14:48:05 -0700
Date: 2010-06-22T14:48:05-07:00	[thread overview]
Message-ID: <lniq5aspre.fsf@nuthaus.mib.org> (raw)
In-Reply-To: op.vebrwgmyz25lew@macpro-eth1.krischik.com

"Martin Krischik" <krischik@users.sourceforge.net> writes:
> Am 14.06.2010, 18:45 Uhr, schrieb Keith Thompson <kst-u@mib.org>:
>
>> Not all Ada compilers implement Short_Short_Integer, but all Ada
>> compilers do implement:
>>    type My_Type is range -128 .. 127;
>
> for My_Type'Size use 8;
>
> otherwise you type might not be as short as you think it is.

That depends on whether you care about the size, or only about the
range.

It might also be rejected if the implementation doesn't use
two's-complement.

-- 
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"



  reply	other threads:[~2010-06-22 21:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-11  1:17 What is the best way to convert Integer to Short_Short_Integer? Adrian Hoe
2010-06-11  2:21 ` Adrian Hoe
2010-06-11  3:14 ` Jeffrey R. Carter
2010-06-11  4:26   ` Adrian Hoe
2010-06-11  7:07     ` Jeffrey R. Carter
2010-06-11  8:59       ` J-P. Rosen
2010-06-11 12:28       ` Maciej Sobczak
2010-06-11 19:05         ` Randy Brukardt
2010-06-13  4:26         ` BrianG
2010-06-13 18:07           ` Maciej Sobczak
2010-06-14  7:28             ` Georg Bauhaus
2010-06-14 16:45             ` Keith Thompson
2010-06-15  4:54               ` Martin Krischik
2010-06-22 21:48                 ` Keith Thompson [this message]
2010-06-15  2:24             ` BrianG
2010-06-15 21:21               ` Maciej Sobczak
2010-06-15 23:39                 ` Georg Bauhaus
2010-06-16  1:27                 ` BrianG
2010-06-11 12:31       ` Brian Drummond
replies disabled

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