MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

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



  • Prev by Date: Selecting all cells of a certain type
  • Next by Date: how to change arguments of standard functions ?
  • Previous by thread: Re: Selecting all cells of a certain type
  • Next by thread: Re: Part assignment