comp.lang.ada
 help / color / mirror / Atom feed
From: anon@anon.org (anon)
Subject: Re: Extra footnote: Re: Size of Vector limited to 1024 MB of Heap Size
Date: Wed, 25 Jun 2008 02:49:12 GMT
Date: 2008-06-25T02:49:12+00:00	[thread overview]
Message-ID: <Imi8k.139373$SV4.48327@bgtnsc04-news.ops.worldnet.att.net> (raw)
In-Reply-To: FJSdndpDzI7XEPzVnZ2dnUVZ_rfinZ2d@comcast.com

RM for Ada 95 and Ada 2005 -- 3.5.4 ( 21 ) : says that an Integer must 
include the range

  -2**15+1 .. +2**15-1   aka     -32768 .. +32767

but it is not limited to that range. Check RM 3.5.4  ( 26 ).
The norm for PC's Integer is -2**32+1 .. +2**32-1

To verify what the true range is on your Ada system look at the 
Standard package.  For GNAT it is build into the compiler so type 
"gnat standard >standard.ads"

Then look at file "standard.ads" you will see lines:

package Standard is
pragma Pure(Standard);

   type Boolean is (False, True);


   type Integer is range -(2 ** 31) .. +(2 ** 31 - 1);

   subtype Natural  is Integer range 0 .. +(2 ** 31 - 1);
   ...
end Standard;


Or try this program
--
-- i.adb
-- 
  with Ada.Text_IO ;
  use Ada.Text_IO ;
  with Ada.Integer_Text_IO ;
  use  Ada.Integer_Text_IO ;

  procedure i is

  begin
    put ( Integer'Last ) ;
    new_line ;
  end ;



In <FJSdndpDzI7XEPzVnZ2dnUVZ_rfinZ2d@comcast.com>, tmoran@acm.org writes:
>> but in Ada: Integers are 4 bytes
>The Ada 95 Reference Manual 3.5.4(21) says
>"In an implementation, the range of Integer shall include the range
>-2**15+1 .. +2**15-1."
>   Has this changed in Ada 2005?




  reply	other threads:[~2008-06-25  2:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-24  8:44 Size of Vector limited to 1024 MB of Heap Size Dennis Hoppe
2008-06-24 15:03 ` Adam Beneschan
2008-06-24 17:32 ` Robert A Duff
2008-06-24 18:55 ` Peter Schildmann
2008-06-25 15:13   ` Dennis Hoppe
2008-06-25 17:26     ` (see below)
2008-06-25 21:09       ` Dennis Hoppe
2008-06-24 20:03 ` Gene
2008-06-24 20:38   ` Robert A Duff
2008-06-24 22:53 ` anon
2008-06-24 23:36   ` Extra footnote: " anon
2008-06-25  0:11     ` tmoran
2008-06-25  2:49       ` anon [this message]
2008-06-25  8:04         ` christoph.grein
2008-06-25 10:39 ` Peter Schildmann
2008-06-25 15:29   ` Dennis Hoppe
replies disabled

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