Re: Table iterator bounds problem

*To*: mathgroup at christensen.cybernetics.net*Subject*: [mg1721] Re: Table iterator bounds problem*From*: Richard Mercer <richard at seuss.math.wright.edu>*Date*: Fri, 21 Jul 1995 01:45:23 -0400

> Hello, > > I get the following strange error with MMA 2.2 on Mac > and RS6000: > > In[4]:= Table[Sin[x],{x, -Pi/2, Pi/2, Pi/10}] > > Pi Pi Pi > Table::iterb: Iterator {x, -(--), --, --} does not have appropriate bounds. > 2 2 10 > > It's the increment that isn't liked, because without it > everything's fine: > > In[4]:= Table[Sin[x],{x, -Pi/2, Pi/2}] > > Out[4]= {-1, -Cos[1], -Cos[2], -Cos[3]} > > > It happens after I load a package I wrote which doesn't > even use Iterators. Can anybody think of what might be > going wrong? I don't particularly want to post the > contents of the long, badly-written package, I'll mail > it if anybody's interested. > > A few ideas about what might be causing the Iterator to > be redefined would be appreciated. It's almost certainly the package that is causing your problem; I don't see it using version 2.2. This sort of thing is not unheard of; packages sometimes have side-effects. Especially "poorly-written" ones, though I have seen side-effects from Standard Packages also. While the side effect can be traced, it's a nasty job that I'm not interested in any more than you. However a simple work-around might do the trick. Try Table[Sin[x],{x, -Pi/2, Pi/2, N[Pi/10]}] and if that doesn't work, try Table[Sin[x],N[{x, -Pi/2, Pi/2, Pi/10}]] Richard Mercer