MathGroup Archive 2005

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

Search the Archive

Re: Format.m , FortranAssign : weird identifiers for temporary variables

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61122] Re: [mg60959] Format.m , FortranAssign : weird identifiers for temporary variables
  • From: Gerry Flanagan <flanagan at materials-sciences.com>
  • Date: Tue, 11 Oct 2005 03:20:13 -0400 (EDT)
  • References: <200510050627.CAA10330@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

I use this package a lot, but when I started trying things to answer 
your question, I got the same behavior. There must be a bad interaction 
between this aging package and Mathematica 5.2. I'm pretty sure I had 
some major projects using Format.m and 5.1, or at least 5.0, and it
worked OK. As you say, it's a very useful package for doing some
industrial strength Fortran (or C) conversion, and it would be great
if someone could update. I'll take a shot when time permits.
Gerry Flanagan

Nicolas Girard wrote:

>Hi all,
>I'm delighted the Format.m package (1) exists, I've dreamt for such a
>package & wish I could have discovered it long before...
>
>(1) http://library.wolfram.com/infocenter/MathSource/60/
>
>unfortunately I can't get it to produce an optimized code with proper
>identifiers for temporary variables. Instead of t1,t2,... I get for
>instance $$1000, $$1001,...
>
>More specifically, although I specify this option: AssignTemporary ->
>{"t", Sequence} evaluating
>
>zz = {x -> a/(b c), y -> d/(c e)};
>FortranAssign[Evaluate[First /@ zz], Last /@ zz, AssignOptimize -> True]
>
>gives
>
>$$13506=1/c
>x=(a*$$13506)/b
>y=(d*$$13506)/e
>
>instead of
>
>t1=1/c
>x=(a*t1)/b
>y=(d*t1)/e
>
>Does anybody know what to do in such a situation ?
>
>Thanks very much in advance,
>cheers,
>Nicolas
>
>
>
>
>  
>



  • Prev by Date: Mathematica GuideBooks for Numerics and Symbolics published
  • Next by Date: Re: Stylesheets don't work unless imported.
  • Previous by thread: Format.m , FortranAssign : weird identifiers for temporary variables
  • Next by thread: Re: Format.m , FortranAssign : weird identifiers for temporary variables