MathGroup Archive 2001

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

Search the Archive

Re: Fw: FORTRAN style, not OK?


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
> 
> 
> 



  • 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