Newsgroups: comp.lang.lisp
From: Pascal Bourguignon <p...@informatimago.com>
Date: Fri, 09 Jun 2006 11:47:23 +0200
Local: Fri, Jun 9 2006 5:47 am
Subject: Re: Standard output formatting control
"phertmuller" <phertmul...@gmail.com> writes: To do this kind of thing, you have to drive the terminal. That is, > My question is so simple (I guess) but I couldn't find help googleing. > I'd like to print something (like a counter) to the standard output, > and I'd like to fix the place where the item has to appear into the > screen. For example, if I want to print the status of a counter, like > (do ((x 0 (1+ x)) > This produces > 0 > How can I do to get these numbers in the same position ? (So, after each class of terminal understand its own protocol, special sequences of bytes that it interprets as commands to move cursor and do some other kind of things (change color, or other character attribute, define zones ("windows"), move characters or lines, etc). On a unix system, there's databases of terminal descriptions mapping Or, you could use the curses (or ncurses) unix library which does that If you use clisp, you can also use the clisp specific SCREEN package: (screen:with-window Now, if you just want a quick-and-dirty solution, you can use the (loop for x from 0 below 3 (it even does the right thing in emacs inferior-lisp buffers, which is Or you could use directly the byte sequences understood by your terminal. http://darcs.informatimago.com/local/darcs/public/lisp/common-lisp/ec... (asdf:oos 'asdf:load-op :com.informatimago.common-lisp) -- ATTENTION: Despite any other listing of product contents found You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||