List of local Variables in Module
- To: mathgroup at smc.vnet.net
- Subject: [mg16180] List of local Variables in Module
- From: phbrf at t-online.de (Peter Breitfeld)
- Date: Tue, 2 Mar 1999 01:13:21 -0500
- Organization: das ist ein breites Feld ...
- Sender: owner-wri-mathgroup at wolfram.com
I want to implement a function like this: myFunction[f_,x_,n_Integer]:= Module[Join[Array[a,n+1,0],{z,expr}], <<<< some code to construct a polynomial in x of degree n with coefficients a[0]...a[n] >>>>> ] Now Mathematica complains Join[...] is not a list. But if I type In= Join[Array[a,2,0],{z,expr}]//FullForm Out=List[a[0],a[1],z,expr] It _is_ a List. Changing n+1 to a number e.g 20 doesn't change Mathematicas behavior. All what helped, was Module{u=Array[a,n+1,0],z,expr}, ..... but now the a[i] are global. Is there a way to get what I want? -- es gruesst Peter -- =--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--= Peter Breitfeld, Saulgau, Germany (PGP public key: 08548045)