What command can I use to clear the screen in CLISP?

For example, cls for cmd.exe. It is very annoying if I can not do this.

+8
lisp clisp
source share
6 answers

You can use screen:clear-window for this:

 (screen:with-window (screen:clear-window screen:*window*)) 

See the documentation for screen for more information. Also note that these functions are specific to clisp.

+11
source share

This did not work for me, but it happened (obtained from the link)

 (screen:clear-window (screen:make-window)) 
+5
source share

if you use clisp inside emacs

 Cc Mo 

which of course

 Control-C Alt-o -or- Control-C Meta-o 

this is the default keyword for calling "clear buffer" from the "repl" menu.

+3
source share

Depending on which terminal you are using (ANSI escape sequence support, for example, in most * nix), you might try:

 (defun cls() (format t "~A[H~@*~A[J" #\escape)) 

Then call it:

 (cls) 
+2
source share

CLISP UNDER WINDOWS

(ext: run-shell-command "cls")

(defun cls () (ext: run-shell-command "cls"))

then write in replay

(kls) and voila

+1
source share

Nilambar is for clisp 2.49 on Windows

When you learn like me, you do a lot of tests, attempts, errors, interrupts, etc., And the repl or interpreter screen is a dump of these attempts, and it is difficult to find the results for new attempts, then you type (ext: run - shell-comand "cls") and the repl clean it screen and the invitation will go to the upper left corner.

0
source share

All Articles