From: Wolfgang Jeltsch <jeltsch@my-deja.com>
Subject: Re: Containers with Ada
Date: 2000/11/20
Date: 2000-11-20T00:00:00+00:00 [thread overview]
Message-ID: <8vc8c0$4oi$1@nnrp1.deja.com> (raw)
In-Reply-To: fOSR5.4515$6W1.400772@news.flash.net
> There's nothing in the standard that requires this for the _exact_
> example you post, AFAIK. If you really think you're seeing this, you
> may want to contact GNAT. Note that replacing "Length : Natural" with
> "Length : Natural := 0" will cause the behavior you describe, as well
> as a potential GNAT message - "warning: creation of object of this
> type may raise Storage_Error.". That _is_ consistent with the
> standard.
Sorry, I didn't remember that the problems with memory consumption I had
arose when I used a default value for Length. In my original List
implementation this was needed for growable lists:
type Element_Array is array(Positive range <>);
type Buffer(Size : Natural := Init_Size) is record
Elements : Element_Array(1 .. Size);
end record;
type Growable_List is record
Element_Buffer : Buffer;
Real_Size : Natural :=0;
end record;
This example is not possible with GNAT why I have to use references to
the buffer why Growable_List must be a controlled type.
Sent via Deja.com http://www.deja.com/
Before you buy.
next prev parent reply other threads:[~2000-11-20 0:00 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-19 0:00 Containers with Ada jeltsch
2000-11-19 0:00 ` Robert Dewar
2000-11-20 4:37 ` Brian Rogoff
2000-11-20 0:00 ` Ted Dennison
2000-11-20 0:00 ` Brian Rogoff
2000-11-19 0:00 ` Robert Dewar
2000-11-20 0:00 ` Wolfgang Jeltsch
2000-11-19 0:00 ` Robert Dewar
2000-11-19 0:00 ` Ken Garlington
2000-11-20 0:00 ` Wolfgang Jeltsch [this message]
2000-11-20 0:00 ` Wolfgang Jeltsch
2000-11-19 0:00 ` Robert Dewar
2000-11-20 0:00 ` Marc A. Criley
2000-11-20 0:00 ` Wolfgang Jeltsch
2000-11-20 0:00 ` Brian Rogoff
2000-11-20 0:00 ` Stephen Leake
2000-11-20 0:00 ` Brian Rogoff
2000-11-21 0:00 ` Warren W. Gay VE3WWG
2000-11-21 0:00 ` Stephen Leake
2000-11-21 0:00 ` Warren W. Gay VE3WWG
2000-11-21 0:00 ` Stephen Leake
2000-11-22 0:00 ` Warren W. Gay VE3WWG
2000-11-22 0:00 ` Containers with Ada (distribution of) Warren W. Gay VE3WWG
[not found] ` <004d01c0567b$cd4e49c0$b0375140@Fudge>
2000-11-25 0:00 ` Does anyone use Anna? Lao Xiao Hai
2000-11-21 0:00 ` Containers with Ada Marc A. Criley
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox