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,1ce0ce3b2db00698 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.219.170 with SMTP id pp10mr17756103pbc.1.1340738922999; Tue, 26 Jun 2012 12:28:42 -0700 (PDT) Path: l9ni23027pbj.0!nntp.google.com!news1.google.com!news.glorb.com!gegeweb.org!aioe.org!.POSTED!not-for-mail From: "John B. Matthews" Newsgroups: comp.lang.ada Subject: Re: how to print an array range? Date: Tue, 26 Jun 2012 15:28:40 -0400 Organization: The Wasteland Message-ID: References: <4fe9bf33$0$6566$9b4e6d93@newsspool4.arcor-online.net> <4fe9daf1$0$6556$9b4e6d93@newsspool4.arcor-online.net> <4fe9edc7$0$6570$9b4e6d93@newsspool4.arcor-online.net> NNTP-Posting-Host: LQJtZWzu+iKlBROuDg+IUg.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Date: 2012-06-26T15:28:40-04:00 List-Id: In article <4fe9edc7$0$6570$9b4e6d93@newsspool4.arcor-online.net>, Georg Bauhaus wrote: > On 26.06.12 19:05, John B. Matthews wrote: > > > Ada.Text_IO.Put_Line(A'First'Img & " " & A'Last'Img); > > In case anyone wishes to write standard Ada when debugging, > not the GNAT language, the implementation specific attribute > 'Img can be replaced by standard Ada's > > Ada.Text_IO.Put_Line > (Integer'Image(A'First) & " " & Integer'Image(A'Last)); > > The static member functions of class Integer ;-) Nasser: This is absolutely correct about Ada, and a helpful point of reference in Java; see also the static member functions of class String. For more control over width and base, instantiate Integer_IO: package Ada.Integer_Text_IO is new Ada.Text_IO.Integer_IO (Integer); An instance of which may already exist in one's library: with Ada.Integer_Text_IO; You might also like to compare these two projects that implement the same root finding algorithm and test program in Ada and Java: -- John B. Matthews trashgod at gmail dot com