MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: FORTRAN style, not OK?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26893] Re: FORTRAN style, not OK?
  • From: "Paul Lutus" <nospam at nosite.com>
  • Date: Fri, 26 Jan 2001 23:29:41 -0500 (EST)
  • References: <94m96g$3nd@smc.vnet.net> <AWQb6.6118$nn4.160298@ralph.vnet.net> <94r611$ibi@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

"Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de> wrote in message
news:94r611$ibi at smc.vnet.net...
>
> > In[20]:=
> > v = 5
> > c = 2
> > v = v - c
> > Out[20]= 5
> > Out[21]= 2
> > Out[22]= 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.

Darn! I should have noticed that. Too bad, I've programmed in C++ so much --
that prevented my seeing this obvious error.

--
Paul Lutus
www.arachnoid.com





  • Prev by Date: Re: Napoleon
  • Next by Date: Mathematica 4.1 + Linux + gnome/sawfish
  • Previous by thread: Re: Fw: FORTRAN style, not OK?
  • Next by thread: Fw: Compiling a function using Module