I want to write a conversion function for maxima, how can I begin?



Robert Dodier wrote:
> On 10/18/09, Richard Fateman <fateman at cs.berkeley.edu> wrote:
>
>> there may be a bug in wxmaxima, but in a console command window, try
>>
>> writefile("c://temp//foo.txt");
>> b:rat(x+1)^10;
>> fortran(z=b);
>>
>> closefile();
>> .....
>> then look in c:\temp\foo.txt
>
> IIRC there is a bug or bugs in GCL's implementation of DRIBBLE.
> The effect of DRIBBLE varies anyway. Maybe with_stdout is
> more predictable across Lisps (then again, maybe not).
>
> In any event, there's no sense in being coy about the problem.
> If you think there's something wrong, don't leave us guessing.
>
> FWIW
>
> Robert Dodier
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
I didn't mean to be coy... the file contains the fortran code, along with
the commands.  There appears to be some difficulty with some of the 
newlines and tabs.
.....


Starts dribbling to c:/temp/foo.txt (2009/10/19, 1:32:29).
NIL
(%o1)                                done
(%i2)
rat(x+1)^10;          10       9       8        7        6        
5        4        3
(%o2)/R/ x   + 10 x  + 45 x  + 120 x  + 210 x  + 252 x  + 210 x  + 120 x
                                                                   2
                                                             + 45 x  + 
10 x + 1
(%i3)
fortran(%);      
x**10+10*x**9+45*x**8+120*x**7+210*x**6+252*x**5+210*x**4+120*x**3
     1   +45*x**2+10*x+1
(%o3)                                done
(%i4)
closefile();