comp.lang.ada
 help / color / mirror / Atom feed
* access assignation. Aliasing problems?
@ 2008-02-01 10:01 Javi
  2008-02-01 14:02 ` Robert A Duff
  2008-02-01 18:24 ` Jeffrey R. Carter
  0 siblings, 2 replies; 5+ messages in thread
From: Javi @ 2008-02-01 10:01 UTC (permalink / raw)


Hi again, I have some problem between access assignations. "List" has
in its definition a private access to ListNode (First, Last). Why
can't I do the assignation: L.List := L.Last ? it does produce an
"accessibilty error check". If both values are null, I can not either
do the assignation.

-----------
...
   procedure putItem (L : in out List; It : in ItemList) is
   begin
      if L.Last = null then
         L.Last := new ListNode'(Item => It, next => null);
         print(L.Last.Item); --DBG this prints OK, the Item was
properly assigned
         L.First := L.Last; -- this fails, L.First and L.Last are both
the same type access ListNode
...
----------


I'm very sorry because of bothering you with this simple questions,
thanks again.



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

end of thread, other threads:[~2008-02-02 21:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-01 10:01 access assignation. Aliasing problems? Javi
2008-02-01 14:02 ` Robert A Duff
2008-02-01 18:24 ` Jeffrey R. Carter
2008-02-02 10:37   ` Stephen Leake
2008-02-02 21:02     ` Javi

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