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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1dd28d5040ded1f8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-09 22:44:44 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!skynet.be!skynet.be!news-lond.gip.net!news.gsl.net!gip.net!newspeer.clara.net!news.clara.net!psiuk-p2!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Announce: Grace project site operational Date: Thu, 9 May 2002 16:22:03 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: References: <3CD88FBD.4070706@telepath.com> <3CD91E31.1060004@telepath.com> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1020975724 25810 136.170.200.133 (9 May 2002 20:22:04 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 9 May 2002 20:22:04 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:23821 Date: 2002-05-09T20:22:04+00:00 List-Id: IIRC, there was XD-Ada targeted to the Mil-Std-1750a and its Integer was 16 bits. This was Ada83 and, on that hardware, it didn't make much sense to do anything else anyway. Of course, this was an embedded application where dynamic allocation was undesirable and the hardware only had 64k words of memory anyway, so you probably wouldn't have cared much if the count returned was only 16 bits. However, I see your point. The Lists package could conceivably define its own List_Element_Count type (with the customary Ada style "implementation defined" we see in lots of the Ada packages now. :-) to guarantee it had sufficient size for most uses. That might make more sense than adding another generic parameter and would be in keeping with the style of lots of other standard Ada packages. Of course, arguably, if a given implementation is only supporting 16 bit integers, it is likely to be for a machine (like the 1750a) that may not easily handle larger sizes and may not have the large memory needed to support lists that would exceed the 32767 elements it could count anyway. Its likely that you'd be working with a machine that had other practical limits (like strings that can't get larger than 32767 characters because they're indexed by Integers as well?) so would you really care? Its just another implementation limit you have to work with - or modify the source since you have it readily available. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com "Randy Brukardt" wrote in message news:udlkuuac05v2c2@corp.supernews.com... > > Not necessarily. I know at least one Ada compiler that has type Integer > as 16-bits on all targets (so all targets have the same memory layout). > > If you care about the range, always use a user-defined type. Certainly > in this case, you'll need a type with a longer range than 32767. >