MathGroup Archive 2003

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

Search the Archive

Re: Part assignment

  • To: mathgroup at smc.vnet.net
  • Subject: [mg44977] Re: Part assignment
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 12 Dec 2003 04:41:14 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <br9i15$d1d$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hmm,

what ist with

Module[{L = {0, 0}},
  L[[1]] = Sequence[1, 1];
  L = L;
  L[[2]] = 2;
  L[[2]]
]

regards
  Jens

Maxim wrote:
> 
> 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: (N)FourierTrigSeries
  • Next by Date: Re: log-log plot with error bars, different data markers
  • Previous by thread: Re: Part assignment
  • Next by thread: RE: Part assignment