Part assignment
- To: mathgroup at smc.vnet.net
- Subject: [mg44972] Part assignment
- From: Maxim <dontsendhere@.>
- Date: Thu, 11 Dec 2003 05:28:24 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Consider
In[1]:=
Module[
{L={0,0}},
L[[1]]=Sequence[1,1];
L[[2]]=2;
L[[2]]
]
Out[1]=
1
The first part assignment constructs a list {Sequence[1,1],0}. Then an
interesting thing happens: part extraction functions (Part and others)
think that the second element of this list is 1, while part assignment
(Set) decides that the second element is 0.
Maxim Rytin
m.r at prontomail.com
- Follow-Ups:
- Re: Part assignment
- From: Andrzej Kozlowski <andrzejK@platon.c.u-tokyo.ac.jp>
- Re: Part assignment
- From: "Sseziwa Mukasa,,(978) 536-2359" <mukasa@jeol.com>
- Re: Part assignment