[Date Index] [Thread Index] [Author Index]
Re: FORTRAN style, not OK?
> In:= > v = 5 > c = 2 > v = v - c > Out= 5 > Out= 2 > Out= 3 > > Whatever the problem is, it is not Mathematica's own syntax. Why not look > more closely at what your code does? > > -- > Paul Lutus > www.arachnoid.com Hi, the problem is, that v is a function call and *not* a reference to a variable. So v[i]=v[i]+1 define a recusion and not a reference to a value in a list like v[[i]]. *And* that v[i] is a function call is a "problem" of Mathematica's syntax. The true problem is that Toshiyuki Meshii try to use function values as arrays because FORTRAN's syntax make no difference between A(i,j) as an array reference *or* as an function call. Regards Jens