MathGroup Archive 2006

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

Search the Archive

Re: Array


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