Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*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 2006

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

Search the Archive

Re: Array

  • To: mathgroup at smc.vnet.net
  • Subject: [mg69250] Re: Array
  • From: Peter Pein <petsie at dordos.net>
  • Date: Sun, 3 Sep 2006 23:46:44 -0400 (EDT)
  • References: <eddptn$3q3$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Bruce Colletti schrieb:
> The command:
> 
>    {A[1], A[2], A[3]} = {1, 2, 3}
> 
> assigns a value to each A-variable.  However, the command:
> 
>    Array[A,3] = {1,2,3}
> 
> generates an error message.
> 
> What is the difference between the two lines?
> 
> Thankx.
> 
> Bruce
> 

Hi Bruce,

  in the first line you evaluated Array[A,3] manually _before_ setting 
the value(s). The second line fails, because Set has got the attribute 
HoldFirst and Array is protected.

Evaluate[Array[A,3]]={1,2,3} works perfectly.

Peter


  • Prev by Date: Re: Array
  • Next by Date: Re: how to identify plane and measuring planar area
  • Previous by thread: Re: Array
  • Next by thread: RE: Array