comp.lang.ada
 help / color / mirror / Atom feed
From: Matthew Heaney <matthewjheaney@earthlink.net>
Subject: Re: Adding functions to generic package
Date: Thu, 02 Jun 2005 13:11:15 GMT
Date: 2005-06-02T13:11:15+00:00	[thread overview]
Message-ID: <ud5r4lx8s.fsf@earthlink.net> (raw)
In-Reply-To: mailman.1.1117716630.17633.comp.lang.ada@ada-france.org

Marius Amado Alves <amado.alves@netcabo.pt> writes:

> Is "exchanging values" not "manipulating the container?"

No.  Exchanging values implies that you're manipulating elements in the
container without changing the container object itself.

In the case of a list, the "container object itself" is a record
comprising pointers to the head and foot of the internal linked list,
and the number of elements.

When you "manipulate the container object itself," that means you're
changing the value of a head or foot pointer, or changing the length.  

That's why operation Swap_Links passes the container, since the head or
foot can change.

Swap does not pass the container, since it only exchanges element
values.  It doesn't manipulate the actual container object.

-Matt



  reply	other threads:[~2005-06-02 13:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-28 15:44 Adding functions to generic package Preben Randhol
2005-05-28 16:27 ` Matthew Heaney
2005-05-28 18:18   ` Preben Randhol
2005-05-28 18:20     ` Preben Randhol
2005-05-29  0:56     ` Matthew Heaney
2005-05-29  8:41       ` Preben Randhol
2005-05-29 14:37         ` Matthew Heaney
2005-05-29 21:31           ` Preben Randhol
2005-05-29 21:33             ` Preben Randhol
2005-05-29 22:30               ` Matthew Heaney
2005-05-30 20:45                 ` Preben Randhol
2005-05-30 22:28                   ` Marius Amado Alves
2005-06-01  1:50                     ` Matthew Heaney
2005-06-02 12:49                       ` Marius Amado Alves
2005-06-02 13:11                         ` Matthew Heaney [this message]
2005-06-01  1:41                   ` Matthew Heaney
2005-05-29 22:27             ` 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