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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e1bb40a3d604c4b X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!.POSTED!not-for-mail From: BrianG Newsgroups: comp.lang.ada Subject: Re: What is the best way to convert Integer to Short_Short_Integer? Date: Sun, 13 Jun 2010 00:26:23 -0400 Organization: A noiseless patient Spider Message-ID: References: <3133a7d5-37ec-4db7-94f0-df15b3535af1@k39g2000yqb.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 13 Jun 2010 04:24:47 +0000 (UTC) Injection-Info: mx01.eternal-september.org; posting-host="T7+V4ifb+JMfyy+SzYQkkw"; logging-data="14216"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/G54aDPw2uik98ECx7H+5a" User-Agent: Thunderbird 2.0.0.24 (X11/20100317) In-Reply-To: <3133a7d5-37ec-4db7-94f0-df15b3535af1@k39g2000yqb.googlegroups.com> Cancel-Lock: sha1:4dhAjdcPzJH5qaSLhsSptCDSXxM= Xref: g2news2.google.com comp.lang.ada:12640 Date: 2010-06-13T00:26:23-04:00 List-Id: Maciej Sobczak wrote: > On 11 Cze, 09:07, "Jeffrey R. Carter" > wrote: > >> Implementations are not required to define Short_Short_Integer (or any other >> predefined integer type except Integer), so the program may fail on other >> compilers. Thus, the use of Short_Short_Integer is not portable. > > I have seen this argument raised many times already, but it was never > substantiated in terms actual risk estimation. What do you mean by a risk estimate, a probability for this particular type? I would doubt anyone would have surveyed all Ada compilers just to generate that number. More generically, I can only duplicate when Jeffrey said: If you use a type provided by your Ada compiler that is not defined in the Ada RM, you cannot presume that that type is provided by a different compiler. (I don't see how this would be different from the same situation in any language. For example, how many C++ compilers don't implement a type named Short_Short_Integer?) > Could you please list the compilers that do not implement this type? All that do not claim to implement it. > > Or is there somewhere a public list of such incompatibilities? What incompatibilities, incompatible with what? Might you mean Ada'95/05 RM 3.5.4(25) "An implementation may provide ..." (the only use of that name I could find in either document)? How can any Ada compiler be incompatible with that? > > -- > Maciej Sobczak * http://www.inspirel.com > > YAMI4 - Messaging Solution for Distributed Systems > http://www.inspirel.com/yami4 --In a world where I feel so small -- I can't stop thinking big...