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,141791b1b1db9b37 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Integer-Types References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Tue, 05 Oct 2004 00:48:41 GMT NNTP-Posting-Host: 63.184.105.243 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.news.pas.earthlink.net 1096937321 63.184.105.243 (Mon, 04 Oct 2004 17:48:41 PDT) NNTP-Posting-Date: Mon, 04 Oct 2004 17:48:41 PDT Xref: g2news1.google.com comp.lang.ada:4691 Date: 2004-10-05T00:48:41+00:00 List-Id: Rick Santa-Cruz wrote: > Is the following the same: > type New_Int is range 1..1000000; > type New_Int1 is new Integer range 1..1000000; No. In the first place, 2 type declarations always create 2 distinct types, even if everything is identical except the type name. New_Int is an integer type with a range of 1 .. 1_000_000. New_Int'Base will be chosen by the compiler. New_Int1 is an integer type with a range of 1 .. 1_000_000. New_Int1'Base has the same representation as Integer. Thus New_Int1 is similar to subtype New_Int1 is Integer range 1 .. 1_000_000; except that type New_Int1 cannot be mixed with Integer, and subtype New_Int1 can. If you have a compiler for a 64-bit processor, Integer is probably a 64-bit type, and New_Int1 will be, too. New_Int'Base will probably be a 32-bit type. Note how much easier it is to read one million when it's written with underscores. -- Jeff Carter "You tiny-brained wipers of other people's bottoms!" Monty Python & the Holy Grail 18