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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Ada e-books Date: Thu, 19 Nov 2015 11:19:44 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <8ec278d8-e97e-47e7-b09b-1e89f08411f3@googlegroups.com> <876110cjrt.fsf@nightsong.com> <2a413f76-f141-48fa-b6b8-76e95d768c13@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Thu, 19 Nov 2015 18:17:27 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="caa759af2a9c666aec02942f6fe5abd6"; logging-data="16262"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+V+p80mFFaJm9x7vAYAYH4OTDI0Qn+Ym0=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: X-Mozilla-News-Host: news://freenews.netfront.net Cancel-Lock: sha1:N6+VuLsyYtEAH9vp82NwuhTOPuI= Xref: news.eternal-september.org comp.lang.ada:28465 Date: 2015-11-19T11:19:44-07:00 List-Id: On 11/19/2015 02:41 AM, Serge Robyns wrote: > > I did indeed find the LRM e-book and this is why I've been asking for the > 2012 AARM (I'll add 2A's to avoid confusion). I'm interested in the > annotated version in e-book format. I want to try to read it as I've been > facing a few issues, miscomprehension, etc. in the hope to understand better > some 'particularities' and things like the Rosen trick and others. The ARM and AARM are available at http://www.ada-auth.org/arm.html in HTML, PDF, and text versions. I'm not aware of any e-book versions of the AARM. Most e-readers can display PDFs. The title of the document is /Ada Reference Manual/, which is why many of us refer to it as the ARM and interpret the A in ARM as "Ada". It's sometimes referred to as the RM or LRM, which naturally lead to the questions, "RM for what?" and "Which language?", which in this context are both answered, "Ada." So yes, you need to say AARM here to refer to the Annotated ARM. > I do agree with another post about the price of Programming in Ada 2012. > However the Kindle format is reasonably priced, but then I don't have a > Kindle. The Kindle app on Android tablets works well. I've heard that Calibre can convert AZW to EPUB, but unless you've done it before you probably won't want to buy a book The Rosen trick is used to gain write access to an in-mode parameter. It was needed pre-Ada 12 to simulate in-out mode parameters to functions; Ada 12 allows such parameters so it is not needed as much. An example is the Generator passed to a random-number function such as Ada.Numerics.Float_Random.Random, specified as function Random (Gen : Generator) return Uniformly_Distributed; An example of its use can be found in pkg PragmARC.Threefry_Random: type Generator is tagged limited private; function Random (State : in Generator) return Unsigned_32; ... type Generator_Ptr is access all Generator; type Generator_Handle (State : Generator_Ptr) is limited null record; type Generator is new Ada.Finalization.Limited_Controlled with record Handle : Generator_Handle (State => Generator'Unchecked_Access); -- The Rosen Trick Key : Unsigned_256; State : Unsigned_256; Output : Unsigned_256; Counter : Natural; end record; Write access to the State parameter of Random can be obtained though S : Generator renames State.Handle.State.all; The PragmARCs are available at https://pragmada.x10hosting.com/pragmarc.htm PragmARC.Threefry_Random is only part of the version for ISO/IEC 8652:2007. -- Jeff Carter "Go and boil your bottoms." Monty Python & the Holy Grail 01