From: bobduff@world.std.com (Robert A Duff)
Subject: Re: 'first of strings returned from a function should be 1?
Date: 1997/07/30
Date: 1997-07-30T00:00:00+00:00 [thread overview]
Message-ID: <EE4v8C.JAA@world.std.com> (raw)
In-Reply-To: 199707291314.PAA24611@basement.replay.com
In article <199707291314.PAA24611@basement.replay.com>,
Anonymous <nobody@REPLAY.COM> wrote:
>procedure P (S : in out String);
>..
>V : String (1 .. 100);
>..
>P (V (5 .. 96) );
>
>What happens inside P? Does this part of V have a lower bound of 1
>inside P but a lower bound of 5 outside?
Not sure what you mean by inside and outside. There's a single slice,
and the Ada rule is that its lower bound is 5, whereas I claim a better
rule would be that the lower bound of all strings, including this slice,
be 1. Inside P, saying "S(1) := 'x';" would modify V(5), given this
not-Ada rule. The point is that P shouldn't have to know it's being
passed a slice of something else -- it just has a sequence of
characters, which it can modify.
- Bob
next prev parent reply other threads:[~1997-07-30 0:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5rcaqi$le8$1@goanna.cs.rmit.edu.au>
1997-07-26 0:00 ` 'first of strings returned from a function should be 1? Matthew Heaney
1997-07-27 0:00 ` David C. Hoos, Sr.
1997-07-27 0:00 ` Dale Stanbrough
1997-07-27 0:00 ` Robert A Duff
1997-07-27 0:00 ` Dale Stanbrough
1997-07-27 0:00 ` Matthew Heaney
1997-07-27 0:00 ` Simon Wright
1997-07-27 0:00 ` Matthew Heaney
1997-07-28 0:00 ` Robert A Duff
1997-07-29 0:00 ` Anonymous
1997-07-30 0:00 ` Robert A Duff [this message]
1997-07-30 0:00 ` Dale Stanbrough
1997-07-27 0:00 ` Dale Stanbrough
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox