Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

Re: list referencing with [[]][[]]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg14024] Re: list referencing with [[]][[]]
  • From: mefisher at my-dejanews.com
  • Date: Wed, 16 Sep 1998 14:12:04 -0400
  • Organization: Deja News - The Leader in Internet Discussion
  • References: <6ten4b$3ea@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <6ten4b$3ea at smc.vnet.net>,
  Allan Hayes <hay at haystack.demon.co.uk> wrote:

> t[[1]][[2]]  is equivalent to t[[1,2]] for extraction of parts, as
> indicated by  your example.
> But for part resetting, as in your second example, it in not equivalent.
> The catch is that part resetting like
>                         a[[3]] = 7
> works only when
> 1) a is a symbol that has been assigned an expression expr with
>                         a = expr
>                         (a:= expr will not do) 2) expr has a part 3
>
> During evaluation,
>                 anotherlist[[2]][[1]] = 7
>                 (that is (anotherlist[[2]])[[1]] = 7 ) becomes
>
>                 {3,4} [[1]] = 7
> which does not meet requirment 1).
>
> Allan

Do you just know this from experimentation or is there somewhere to look
this up (and evaluation issues like this)?

--Mark.
mark.fisher at atl.frb.org

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


  • Prev by Date: resorting coordinates after the rotations
  • Next by Date: Re: Q:efficient list operation wanted
  • Previous by thread: Re: list referencing with [[]][[]]
  • Next by thread: Re: Q:efficient list operation wanted