Hullo,
Many thanks to Chris Thornton, Chris Dollin and Robin Popplestone who
responded to my cry for help.
Having spent a further couple of days wrestling with my particular
problem I have finally discovered my mistake and I thought it might be
amusing to more competant POP programmers.
> From: christ@uk.ac.sussex.cogs (Chris J. Thornton)
> Also, due to the fact that data structures can be enormous, they are not
> copied when placed into a local procedure variable. Thus procedures CAN
> destructively update the components of data objects received via local
> parameters. The moral is, you do have to use some sort of explicit
> copying if you want to do this.
This was the first clue, so I resorted to copytree to do my explicit copy,
apparently without success, so I wrote my own duplicate_list, which again
didn't solve my problem. Then it came to me - my list was a list of VECTORS
which aren't copied by copytree and it was through accessing the vector
componants that I was changing my apparently copied list! YEUCH!!!
I suppose to moral of this story is to use copydata and not copytree?
Thanks again,
Daniel.
|