Such as cls for cmd.exe. It's very annoy if I can't do this.
7 Answers
if you are running clisp inside emacs
C-c M-o
which of course is
Control-C Alt-o -or-
Control-C Meta-o
this is the default keybinding to call "clear buffer" from the "repl" menu.

- 276
- 2
- 5
-
1That is not an appropriate answer because it does not programmatically clear the screen from within the lisp/clisp code. – Feb 15 '20 at 11:18
Depending on what terminal you're using(support for ANSI control sequences, for example on most *nix), you could try:
(defun cls()
(format t "~A[H~@*~A[J" #\escape))
Then call it:
(cls)

- 1,091
- 1
- 9
- 23
CLISP UNDER WINDOWS
(ext:run-shell-command "cls")
(defun cls () (ext:run-shell-command "cls") )
then write in the repl
(cls) and voila

- 19
- 1
-
Can you please also add explanation how this resolves the issue? – Nilambar Sharma Jun 03 '19 at 03:43
(loop for x from 1 to 1400
do (princ " ")
)
-
Of course you can change the 1400 to any number which most suits you – user3058990 Mar 06 '21 at 19:58
Nilambar this is for clisp 2.49 running under windows
When you are learning like me make a lot of test, try, error, abort etc and screen of repl or interpreter its a pigsty of that trys and its difficult to beginer to found the results to new trys then you type (ext:run-shell-comand "cls") and the repl clean it screen and the prompt go to upper left corner.

- 1
-
1Hello Sai. You are answering the comment in another answer. Please edit your first answer or use the answer comments to give more information. – Diego Malone Jun 03 '19 at 23:13