Hi Kerry
When you want a copy of the list and not the actual list then you would use
the duplicate function
ie.
wordList = gPuzzleList[gWhichPuzzle].duplicat()
Sincerely
Mark
--------------------------------------------
Mark R. Jonkman
Mark R. Jonkman Consulting
ADDRESS: 20 Windermere Crt., Guelph, ON, CANADA N1E 3L4
PHONE: 519-837-8509
EMAIL: [EMAIL PROTECTED]
--------------------------------------------
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Kerry Thompson
> Sent: Tuesday, November 21, 2000 9:03 PM
> To: [EMAIL PROTECTED]
> Subject: <lingo-l> Lists: reference vs. value
>
>
> I think I'm copying a reference, not a value.
>
> I have a global list of lists, gPuzzleList. To arrange the words for a
> particular puzzle, I'm doing:
>
> wordList = gPuzzleList[gWhichPuzzle]
>
> later, after I place the word, I'm doing
>
> deleteAt wordList, 1
>
> Which, to my surprise, also deletes the first item in gPuzzleList. So, I
> must be making a copy of the pointer rather than the list.
>
> The question is, how do I copy the contents of the list so I can
> manipulate
> the copy without changing the original?
>
> Cordially,
> Kerry Thompson
> Learning Network
>
>
> [To remove yourself from this list, or to change to digest mode, go to
> http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
> email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
> Lingo-L is for learning and helping with programming Lingo. Thanks!]
>
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]