8

比如 cmd.exe 的 cls。如果我不能做到这一点,那就太烦人了。

4

7 回答 7

12

您可以使用它screen:clear-window来执行此操作:

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

有关详细信息,请参阅屏幕上的文档。另请注意,这些函数是特定于 clisp 的。

于 2011-02-03T04:04:41.733 回答
5

如果你在 emacs 中运行 clisp

C-c M-o

这当然是

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

这是从“repl”菜单调用“clear buffer”的默认键绑定。

于 2013-07-23T13:01:06.750 回答
5

这对我不起作用,但确实如此(从链接获得)

(screen:clear-window (screen:make-window))
于 2013-06-11T07:00:06.777 回答
4

根据您使用的终端(支持 ANSI 控制序列,例如在大多数 *nix 上),您可以尝试:

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

然后调用它:

(cls)
于 2014-07-22T11:04:56.117 回答
2

夹在 WINDOWS 下

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

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

然后写在repl

(cls)和瞧

于 2019-06-03T03:38:27.437 回答
-1

(循环 x 从 1 到 1400 do (princ " ")

于 2021-03-06T19:53:19.637 回答
-2

Nilambar 这是用于在 windows 下运行的 clisp 2.49

当你像我一样学习时,进行大量测试、尝试、错误、中止等以及 repl 或解释器的屏幕,它是一个尝试的猪圈,并且很难开始找到新尝试的结果,然后你输入 (ext:run- shell-comand "cls") 和 repl clean it 屏幕和提示符转到左上角。

于 2019-06-03T22:16:36.607 回答