MathGroup Archive 2006

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

Search the Archive

Re: Array


On Sep 3, 2006, at 1:39 AM, Bruce Colletti wrote:

> 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?

Array[A,3]={1,2,3} attempts to assign {1,2,3} to Array[A,3] (since Set 
doesn't evaluate the left hand side) whose head is protected.

There are so many differences between the first and apparent intended 
meaning (I assume you want a1 dimensional array whose elements are 1,2 
and 3) I don't know where to begin.

Regards,

Ssezi


  • Prev by Date: Re: Problem with using /.
  • Next by Date: Re: Array
  • Previous by thread: Array
  • Next by thread: Re: Array