comp.lang.ada
 help / color / mirror / Atom feed
* Bounds of Slice's return value
@ 2002-01-18 23:16 Matthew Woodcraft
  2002-01-19  1:24 ` Jeffrey Carter
  2002-01-21 20:19 ` Matthew Heaney
  0 siblings, 2 replies; 6+ messages in thread
From: Matthew Woodcraft @ 2002-01-18 23:16 UTC (permalink / raw)



Ada.Strings.Unbounded.Slice returns a Standard.String.

Am I guaranteed anything about the bounds of this string?

In particular, if I run the following program, should I always get '1',
or is an implementation allowed to choose a different value?


with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Text_IO; use Ada.Text_IO;

procedure Slice_Return_Value is
   U : Unbounded_String := To_Unbounded_String ("hello");
   S : String := Slice (U, 2, 3);
begin
   Put_Line (Integer'Image (S'first));
end Slice_Return_Value;

-M-



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-01-21 20:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-18 23:16 Bounds of Slice's return value Matthew Woodcraft
2002-01-19  1:24 ` Jeffrey Carter
2002-01-19 10:45   ` Matthew Woodcraft
2002-01-19 14:32     ` Robert A Duff
2002-01-19 17:19       ` Matthew Woodcraft
2002-01-21 20:19 ` Matthew Heaney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox