Re: Do loop is faulty

*To*: mathgroup at smc.vnet.net*Subject*: [mg55403] Re: Do loop is faulty*From*: David Bailey <dave at Remove_Thisdbailey.co.uk>*Date*: Tue, 22 Mar 2005 03:50:54 -0500 (EST)*References*: <d1jfsj$sa4$1@smc.vnet.net> <d1lvsb$7ub$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Dumb Founded, Why do you keep complaining that Mathematica does not work when you feed it mangled syntax? Would a C compiler produce anything useful if you fed it Fortran, or half-Fortran-half-C? Perhaps you should start with some working code - say from the help files - and gradually modify it. In particular, please note that b[i] calls a function with the name b, b[[i]] accesses a 1-dimensional array stored in b, but only if you have already set up the variable b to be an array: b=Array[0&,10]; b[[5]]=3; b {0, 0, 0, 0, 3, 0, 0, 0, 0, 0} David Bailey dbaileyconsultancy.co.uk