Alasdair McAndrew | 6 Sep 01:38
Gravatar

Printing without linefeed?

I'm running a long program, and every now and then I'd like to print something, just as an indicator of how much it's done.  The "print" command gives me a linefeed, which I don't want.  The lisp command "?write" might work, if I could work out how to include a space as well; ?write(i," ") doesn't work.  Also, I don't seem to be able to use ?write in a program.  Are there other options?

Thanks,
Alasdair

--
Blog: http://amca01.wordpress.com
_______________________________________________
Maxima mailing list
Maxima <at> math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
Raymond Toy | 6 Sep 06:45

Re: Printing without linefeed?



On Fri, Sep 5, 2008 at 7:42 PM, Alasdair McAndrew <amca01 <at> gmail.com> wrote:
I'm running a long program, and every now and then I'd like to print something, just as an indicator of how much it's done.  The "print" command gives me a linefeed, which I don't want.  The lisp command "?write" might work, if I could work out how to include a space as well; ?write(i," ") doesn't work.  Also, I don't seem to be able to use ?write in a program.  Are there other options?

?? print gives several other choices.  Perhaps sprint will do what you want?

Ray
 

_______________________________________________
Maxima mailing list
Maxima <at> math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
van Nek | 6 Sep 11:43
Favicon

Re: Printing without linefeed?


There is also printf for formatted printing (which allows printing without linefeed of course) 
which is unfortunately poor documented at the moment. For examples you might want to 
look into contrib/stringproc/rtestprintf.mac. 

By the way, since 5.15.0 sprint is implemented via printf. 

Volker

Am 6 Sep 2008 um 9:42 hat Alasdair McAndrew geschrieben:

> 
> I'm running a long program, and every now and then I'd like to print something, just as an 
> indicator of how much it's done.The "print" command gives me a linefeed, which I don't 
> want.The lisp command "?write" might work, if I could work out how to include a space as well; 
> ?write(i," ") doesn't work. Also, I don't seem to be able to use ?write in a program. Are there 
> other options?
> 
> Thanks,
> Alasdair 
> --
> Blog: http://amca01.wordpress.com 

Gmane