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,e1bb40a3d604c4b X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.ada Subject: Re: What is the best way to convert Integer to Short_Short_Integer? Date: Mon, 14 Jun 2010 09:45:23 -0700 Organization: None to speak of Message-ID: References: <3133a7d5-37ec-4db7-94f0-df15b3535af1@k39g2000yqb.googlegroups.com> <24e3f643-5bb5-44c9-89ec-093247f6c194@w12g2000yqj.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Mon, 14 Jun 2010 16:46:31 +0000 (UTC) Injection-Info: mx01.eternal-september.org; posting-host="9nFTuw1iclElqUG5+//YDQ"; logging-data="16237"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Rpbz40qN+LEazpslzpu1z" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:1IaUyCVvwsW0YL+n7qcKyqWAaTk= sha1:/ytAm8aiLxek3IBWN7mX6N/3Lz0= Xref: g2news1.google.com comp.lang.ada:11715 Date: 2010-06-14T09:45:23-07:00 List-Id: Maciej Sobczak writes: > On 13 Cze, 06:26, BrianG wrote: >> What do you mean by a risk estimate, a probability for this particular >> type? > > The likelihood of getting into trouble by using this type. > (I use the word "likelihood" instead of "probability" as this > obviously cannot be expressed with a single number.) You don't need to worry about the "probability" that your code is correct if you just write it to be portable and correct in the first place. Not all Ada compilers implement Short_Short_Integer, but all Ada compilers do implement: type My_Type is range -128 .. 127; [...] > I will take the opportunity to extend my question: is there a > "compatibility list" for Ada compilers with regard to all language > features that are described as optional? Not just Short_Short_Integer, > but also Long_Long_Integer (just joking :-) ), pragmas, annexes, etc.? Why the "just joking :-)" for Long_Long_Integer? It's another optional type, and some Ada compilers do implement it. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Nokia "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"