comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: how to print an array range?
Date: Tue, 26 Jun 2012 18:58:08 +0200
Date: 2012-06-26T18:58:09+02:00	[thread overview]
Message-ID: <4fe9ea21$0$6555$9b4e6d93@newsspool4.arcor-online.net> (raw)
In-Reply-To: <jscnv3$9kt$1@speranza.aioe.org>

On 26.06.12 18:28, Nasser M. Abbasi wrote:

> I can't just type write put(A'range(1)). And when I write
> put(A'first(1)) it prints -2147483648.

You had got it already, I think. Here is LRM 3.6.2:

7     A'Range A'Range is equivalent to the range A'First .. A'Last,
              except that the prefix A is only evaluated once.

Equivalent also means that you can write, in source, A'Range(n)
wherever you could equivalently write A'First(n) .. A'Last(n).
Consider writing

 Put (A'First(1) .. A'Last(1));

in source. But this has no meaning as a parameter to Put.

One way is to Put("..") between Put(A'First(1)) and Put(A'Last(1));



  reply	other threads:[~2012-06-26 16:58 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 [this message]
2012-06-26 17:05           ` John B. Matthews
2012-06-26 17:13             ` Georg Bauhaus
2012-06-26 19:28               ` John B. Matthews
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