Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

Re: FORTRAN style, not OK?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26842] Re: FORTRAN style, not OK?
  • From: "Paul Lutus" <nospam at nosite.com>
  • Date: Thu, 25 Jan 2001 01:13:21 -0500 (EST)
  • References: <94m96g$3nd@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

"Toshiyuki (Toshi) Meshii" <meshii at mech.fukui-u.ac.jp> wrote in message
news:94m96g$3nd at smc.vnet.net...
> Hello,
>
> I found out a case in which I cannot directly use FORTRAN statement in
> Mathematica programming.
> Here is the case good in FORTRAN.
>
> v=v-c
>
> However in Mathematica, it seems that I have to use a trick like this.
>
> temp=v;
> v=temp-c
>
> Is there more smart way for doing the above?
> Please let me know.
> ___________________________________
> The final goal for me is to do the following.
>
> Do[
>  Do[
>       v[i][j][k] = v[i][j][k] - va[j]
>       ,{j, 3}]
>     ,{k, 100}];

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





  • Prev by Date: Re: Variables from Lists
  • Next by Date: Re: Overriding Power
  • Previous by thread: Re: i need help
  • Next by thread: Re: Fw: FORTRAN style, not OK?