[Maxima] printf inside for loop
woollett at charter.net
Sat Aug 4 17:32:53 CDT 2007
Hello Maxima ML:
I am trying to use printf() to format columns of floats. Using printf()
inside block gave me no output, so I have reduced my query to using printf()
inside a for loop with just integers:
1. for loop with print() looks ok:
(%i38) for n thru 3 do print(n);
2. for loop with printf() , here guided by the example in the Maxima manual.
(%i42) for n thru 3 do ev( printf(false,"~d",m),m=n );
3. maybe I need to wrap n in ev()? still no output
%i43) for n thru 3 do ev( printf(false,"~d",m),m=ev(n) );
4. trying printf() in a simpler version: again no output.
%i40) for n thru 3 do printf(false,"~d",n);
5 perhaps I need to force some evaluation?? no output
(%i41) for n thru 3 do printf(false,"~d",ev(n));
The manual suggest looking at Lisp references. Since
I have not studied Lisp, I thought someone here
could give me a quicker clue.
Any help would be most welcome.
More information about the Maxima