comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <Stephen.A.Leake@nasa.gov>
Subject: Re: Using Grace.Lists.Unbounded in WindowsXP/GNAT3.15p
Date: 13 Mar 2003 09:51:12 -0500
Date: 2003-03-13T15:05:04+00:00	[thread overview]
Message-ID: <uznnz9v6n.fsf@nasa.gov> (raw)
In-Reply-To: 3e705a78$1@news.wineasy.se

"Frank" <franjoe@frisurf.no> writes:

> Hi!
> 
> Using WindowsXP/GNAT3.15p/Grace.Lists "1.1".
> 
> See source code and execution-dump at the end.
> 
> 1)
> In this example I add a number of nodes to a list, and traverse them
> successfully to
> print their contence.
> 
> 2)
> I traverse the list until the second node.
> Then I try to remove the second Node.
> The library now throws me a CONSTRAINT_ERROR.
> 
> 
> Where am I mistaking?

I'll look at this in detail later. But I suspect the problem is a
design flaw in the current example implementation of
Grace.Lists.Unbounded. Try declaring "Allowed_Nodes" at library level,
rather than in a procedure; I think the "access check failed" is not a
null access but a "nesting level" access failure.

When I implemented a draft version of Grace.Lists.Unbounded, I had to
add an extra layer of indirection to avoid this problem. The current
example implementation does not do that.

> The big picture(but not fully coded in this example):
> What I want to achieve is to be able to traverse a list, and based on
> information in the
> node, decide to remove it from the current position in the list and reinsert
> it at the end.
> This is done to postpone the calculation of the Node until all other Nodes
> have been calculated.

It is reasonable to expect Grace.Lists to handle this.

Until a better implementation of Grace is available (care to
contribute one? :), you might try SAL or Charles or Booch or ...

-- 
-- Stephe



  reply	other threads:[~2003-03-13 14:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-13 10:16 Using Grace.Lists.Unbounded in WindowsXP/GNAT3.15p Frank
2003-03-13 14:51 ` Stephen Leake [this message]
2003-03-13 15:56   ` Frank
2003-03-13 16:26 ` Matthew Heaney
replies disabled

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