Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: Traditional Ordering of Equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg88805] Re: Traditional Ordering of Equations
  • From: dh <dh at metrohm.ch>
  • Date: Fri, 16 May 2008 06:27:03 -0400 (EDT)
  • References: <g0jk79$ta$1@smc.vnet.net>


$Version

"6.0 for Microsoft Windows (32-bit) (February 7, 2008)"

Hallo Joost,

I can not reproduce the reordering:

1) Print[HoldForm[b "=" a]] prints b = a as expected

2) Print[b "="a] prints = a b as expected

but you get output as 2) from input as 1) ????

Daniel



Joost Keuskamp wrote:

> As a beginner in Mathematica I am using Mathematica 6.0 for integration and simplification of a number of functions which I subsequently use in a Fortran program. Now I have two questions which I cannot find the answer to in the documentation or forums:

> 

> - Is there a way to prevent Mathematica from reordering a function to its standard order upon evaluation?

> 

> - I want to list all resulting functions in one cell, as can be done using the Print and Fortranform commands. I want the list to look like this:

> 

> 

> FunctionName1 = Function1

> FunctionName2 = Function2

> FunctionName3 = Function3

> etc.

> 

> All these functions were defined earlier in the notebook using the following syntax:

> 

> FunctionName1 = Function1

> 

> I tried writing a new Mathematica function to do this:

> 

> FortranFormulas[ff_] := 

>  Print[HoldForm[ff] "=" FortranForm[ff]]

> FunctionNameList = {NO3inYt, NO3outYt}

> Scan[FortranFormulas, FunctionNameList]

> 

> However, this generates an output like:

> = Function1inFortranForm Function1

> = Function2inFortranForm Function2

> 

> The alternative:

> FortranFormulas[ff_] := 

>  Print[ff] "=" FortranForm[Release[ff]]]

> FunctionNameList = {HoldForm[NO3inYt], HoldForm[NO3outYt]}

> Scan[FortranFormulas, FunctionNameList]

> 

> generates an output like:

> = FunctionName1 FunctionName1

> = FunctionName2 FunctionName2

> 

> Both are incorrect and in the wrong order.

> 

> I don't know what to do now and was hoping that anyone had a suggestion.. ..many thanks in advance!

> 




  • Prev by Date: Re: Applying the Integration Function to a List Of Regions
  • Next by Date: Re: Applying the Integration Function to a List Of
  • Previous by thread: Traditional Ordering of Equations
  • Next by thread: Re: Traditional Ordering of Equations