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.3 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,92c39a3be0a7f17d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-20 06:09:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!freenix!enst!enst.fr!not-for-mail From: Christoph Grein Newsgroups: comp.lang.ada Subject: Re: ARG Urgent Problems (was: labeling) Date: Wed, 20 Mar 2002 15:07:18 +0100 (MET) Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii X-Trace: avanie.enst.fr 1016633342 76667 137.194.161.2 (20 Mar 2002 14:09:02 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Wed, 20 Mar 2002 14:09:02 +0000 (UTC) Return-Path: Content-MD5: 8rBA0sfba6ZrUbMj9DMOEQ== X-Mailer: dtmail 1.2.1 CDE Version 1.2.1 SunOS 5.6 sun4u sparc Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.8 Precedence: bulk X-Reply-To: Christoph Grein List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:21487 Date: 2002-03-20T15:07:18+01:00 >The only problem being that your compiler might reject to compile this because >>it cannot fulfil the request. My_Int'Base will necessarily be a >_signed_integer_ >>at least big enough to hold the specified range, will thus need at least 33 >>bits, most probably a 64 bit >>type. >True, but there is no requirement that T'Base occupies the same number of bits ~~~ The "but" is unnecessary here, you repeat in other words what I wanted to say. If there is no such type on your machine, the compiler will reject the declaration. Gnat provides a 64 bit type, as you've tried: >as T. >I just tried the following with Gnat: > type Int32 is range 0..2**32-1; > for Int32'size use 32; > I : Int32; > B: Int32'Base; >begin > Put_Line (Integer'image (I'size)); > Put_Line (Integer'Image (B'size)); > >And it prints: >32 >64