Re: lingo-l a simple list question!

2002-02-20 Thread Colin Holgate
But, to my surprise when I delete items from initialList, tempList get the items deleted too. I can put the initial list content to a field and extract them later after calculation. Is there a better way to deal with this? Yes: newlist = duplicate(oldlist) That will make a copy of the

RE: lingo-l a simple list question!

2002-02-20 Thread Sean Wilson
tempList = initialList.duplicate() ^^^ HTH, -Sean. [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L

Re: lingo-l a simple list question!

2002-02-20 Thread Tab Julius
What you're finding out is that lists are passed by reference, so when you do tempList=initialList all you are really doing is making an additional pointer to the same list. This can be very helpful, or very problematic, depending on what you're trying to accomplish! :) But you want to

Re: lingo-l a simple list question!

2002-02-20 Thread Leah D Kramer
I believe that when you assign a list to variable X, that X is a reference (or pointer) to the original list. (Unlike other situations like a number or a string where a copy of the value is stored in X.) When you change something via the reference, the original is changed as well. Lingo