Re: list assignment problem
- To: mathgroup@smc.vnet.net
- Subject: [mg12465] Re: [mg12434] list assignment problem
- From: Bob Hanlon <BobHanlon@aol.com>
- Date: Tue, 19 May 1998 13:31:33 -0400
You are formating the Part specification improperly. See on-line help
for Part.
jlist = {{1, 2}, {3, 4}}
{{1, 2}, {3, 4}}
jlist[[1,2]] = 6;
jlist
{{1, 6}, {3, 4}}
Bob Hanlon
In a message dated 5/14/98 5:31:26 PM, rayhan@ece.uvic.ca wrote:
>I am trying to write a program that requires handling 3D list. I am
>faced with this problem which is unable to change the values of the
>list. For example, when I run the following lines, I get this error
>msg: Part::setps: jlist[[1]] in assignment of part is not a symbol.
>
>In[294]:= jlist={{1,2},{3,4}}
>
>Out[294]= {{1, 2}, {3, 4}}
>
>In[295]:= jlist[[1]][[2]]=6
>
>Part::setps: jlist[[1]] in assignment of part is not a symbol.
>
>Out[295]= 6
>
>I would appreciate if any one could tell me what I am doing wrong ?