comp.lang.ada
 help / color / mirror / Atom feed
* ada.strings.unbounded "free" and "String_Access"
@ 2000-03-07  0:00 Al Johnston
  2000-03-08  0:00 ` Nick Roberts
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Al Johnston @ 2000-03-07  0:00 UTC (permalink / raw)


I am new to ada95 and am porting our code from ada83 to 95.
We currently pass things all over the place using a type
similar to unbounded's string_access.  Regrettably the
code relied on the 'address of an object of that type
being an address... so our code is broken in a lot of
places.  I am looking at replacing a lot of the places
where we were using our own "access String" type with
this strange unbounded.unbounded_string type.

But  I was wondering...  why is the type "ada.strings.
unbounded.string_access" as well as a "free" routine
for this type, provided in the spec of unbounded.strings?

I cant find a way of getting anything from this package
that is of this type, much less having a need to free it.

What don't I know? (why are these two available?).

The closes I could come was the function
"to_String(Souce : Unbounded_String) return String"
But if I understand this stuff correctly, this function
returns a copy of the string by-value.  If I wanted
the results of this function to hang around I would
have to do a "new" own my own, and then these
two (other wise useless) things would be useful... but
the really don't have anything to do with the "public"
part of the package.... again, what don't I understand.

thanks.

-al





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

end of thread, other threads:[~2000-03-13  0:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-07  0:00 ada.strings.unbounded "free" and "String_Access" Al Johnston
2000-03-08  0:00 ` Nick Roberts
2000-03-08  0:00   ` Jeff Carter
2000-03-10  0:00     ` Ted Dennison
2000-03-11  0:00   ` Robert A Duff
2000-03-13  0:00     ` Robert Dewar
2000-03-08  0:00 ` Robert A Duff
2000-03-09  0:00 ` Al Johnston

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