Re: Debracketing array symbols
- To: mathgroup at smc.vnet.net
- Subject: [mg92237] Re: Debracketing array symbols
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Tue, 23 Sep 2008 07:36:46 -0400 (EDT)
On 9/22/08 at 5:25 AM, carlos at Colorado.EDU wrote: >A related question A={A[1], A[2], A[3], A[4]} produces infinite >recursion in 4.2 and 5.2 (NB - I prepare all coursework with 4.2 for >compatibility with some remote students in industry) >Is the symbol A used on the RHS? Yes. >{A[1], A[2], A[3], A[4]} //FullForm just shows >List[A[1],A[2],A[3],A[4]] which does not tell me much. Where is the >role of A in the RHS explained in the documentation?. Per basic Mathematica syntax, square brackets are *always* used to delimit arguments to functions. So, the syntax A[1] is interpreted as the function named A to be evaluated at the argument 1. Given this the rhs of what you wrote defines a list where the function A is evaluated at 4 different values. Of course since A has not yet been defined the evaluator can only return the unevaluated form of A at the four arguments. But now the rest of what you wrote attempts to define A as the list of four instances of A evaluated at 4 points. This obviously is an infinite recursion as indicated by the error message.