comp.lang.ada
 help / color / mirror / Atom feed
* What's the deal with "slice" in Ada.Strings.Bounded
@ 1997-07-15  0:00 Jan Galkowski
  1997-07-15  0:00 ` Mark Griglock
  1997-07-16  0:00 ` Robert Dewar
  0 siblings, 2 replies; 3+ messages in thread
From: Jan Galkowski @ 1997-07-15  0:00 UTC (permalink / raw)



The package Ada.Strings.Bounded operates upon a private type
"Bounded_String".  Among the other constructors and manipulators
in that package, there is an interrogator called "Slice".

What I'm trying to figure out is how to create a Bounded_String
out of the return value from this "Slice".  The type
given for the return value is the general "String".  Naturally, 
compilers balk at trying to specify a variable having definite
dimensions using an object which has indefinite ones.

So, how would you suggest making a Bounded_String out of this
return value from "Slice"?  In other words, how does one
write, for this case, a function

   function To_Bounded_String( Given_String : in String ) 
      return Bounded_String is
    ...
   begin
    ...
   end To_Bounded_String ;

where Bounded_String has been given a fixed length by instantiating
"Generic_Bounded_Length".

TIA.

Ciao.

-- 
 Jan Theodore Galkowski, 
 developer, statistician,

  speaking only for myself,
  
  jan@digicomp.com 
  jtgalkowski@worldnet.att.net

  Member, 

    the American Statistical Association,
    the Union of Concerned Scientists.




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

end of thread, other threads:[~1997-07-16  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-07-15  0:00 What's the deal with "slice" in Ada.Strings.Bounded Jan Galkowski
1997-07-15  0:00 ` Mark Griglock
1997-07-16  0:00 ` Robert Dewar

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