From: "John B. Matthews" <nospam@nospam.invalid>
Subject: Re: how to print an array range?
Date: Tue, 26 Jun 2012 15:28:40 -0400
Date: 2012-06-26T15:28:40-04:00 [thread overview]
Message-ID: <nospam-EC5ED9.15284026062012@news.aioe.org> (raw)
In-Reply-To: 4fe9edc7$0$6570$9b4e6d93@newsspool4.arcor-online.net
In article <4fe9edc7$0$6570$9b4e6d93@newsspool4.arcor-online.net>,
Georg Bauhaus <rm.dash-bauhaus@futureapps.de> 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:
<http://home.roadrunner.com/~jbmatthews/misc/groots.html>
<http://sites.google.com/site/drjohnbmatthews/polyroots>
--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
next prev parent reply other threads:[~2012-06-26 19:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-26 13:47 how to print an array range? Nasser M. Abbasi
2012-06-26 13:54 ` Georg Bauhaus
2012-06-26 14:08 ` Nasser M. Abbasi
2012-06-26 14:24 ` Nasser M. Abbasi
2012-06-26 15:07 ` AdaMagica
2012-06-26 15:53 ` Georg Bauhaus
2012-06-26 16:28 ` Nasser M. Abbasi
2012-06-26 16:58 ` Georg Bauhaus
2012-06-26 17:05 ` John B. Matthews
2012-06-26 17:13 ` Georg Bauhaus
2012-06-26 19:28 ` John B. Matthews [this message]
2012-06-26 17:15 ` Adam Beneschan
2012-06-26 21:31 ` Robert A Duff
2012-06-26 22:17 ` Dmitry A. Kazakov
2012-06-26 22:39 ` Randy Brukardt
[not found] ` <33dku79r14uuvmlgpodg9ri7prnq9v5f94@invalid.netcom.com>
2012-06-26 23:13 ` Jeffrey Carter
2012-06-27 6:58 ` Jacob Sparre Andersen
2012-06-26 14:07 ` Dmitry A. Kazakov
2012-06-28 6:59 ` Shark8
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox