MathGroup Archive 2001

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

Search the Archive

Re: Fw: FORTRAN style, not OK?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26857] Re: [mg26806] Fw: FORTRAN style, not OK?
  • From: "Carl K. Woll" <carlw at u.washington.edu>
  • Date: Fri, 26 Jan 2001 01:27:11 -0500 (EST)
  • References: <200101240918.EAA03595@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Toshi,

Try using the function AddTo, which has the shortcut +=. So

v += -c

will do the trick.

Carl Woll
Physics Dept
U of Washington

----- Original Message ----- 
From: "Toshiyuki (Toshi) Meshii" <meshii at mech.fukui-u.ac.jp>
To: mathgroup at smc.vnet.net
Subject: [mg26857] [mg26806] Fw: FORTRAN style, not OK?


> 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}];
> 
> -Toshi
> 
> 
> 



  • Follow-Ups:
    • i need help
      • From: "Vinod Kumar" <vinodkp@bom6.vsnl.net.in>
  • Prev by Date: Re: Factor[1+x^4]
  • Next by Date: Re: Factor[1+x^4]
  • Previous by thread: Fw: FORTRAN style, not OK?
  • Next by thread: i need help