在SBCL中如何先輸出提示

2021-05-23 11:24:17 字數 417 閱讀 3114

(progn

(format t "please enter your name:")

(read-line))

一道簡單的程式,在clisp和sbcl的執行效果竟然不一樣,clisp執行時發現,此程式是先輸出please enter your name:的提示,而在sbcl卻不會先提示,後來找了一下sbcl手冊的函式發現有乙個稱作force-output的函式在多個地方用到,於是就將此函式在此處牛刀小試,程式如下所示:

(progn

(format t "please enter your name:")

(force-output)

(read-line))

執行發現結果跟函式名字的意義是一樣的,而lisp讓我喜歡的理由之一也是因為她的命名真正的做到見其名知其義,不像近代的語言做得不夠清晰明確。

php中如何輸出時間 在php中如何獲得未來時間?

php獲取昨天日期 date y m d strtotime 1 day php獲取明天日期 date y m d strtotime 1 day php獲取一周後日期 date y m d strtotime 1 week php獲取一周零兩天四小時兩秒後時間 date y m d g h s s...

在xml中新增提示

步驟1 在window preferences myeclipse files and editors xml xml catalog 步驟2 在xml catalog對話方塊中選中add,在add xml catalog entry中,key type 中選uri,在location中點file ...

在textView中顯示提示文字

textview的屬性 直接上 吧 uitextview的常用方法 主要用來輸入和顯示多行文字資訊 uitextview onetextview uitextview alloc init onetextview.frame cgrectmake 0,20,320,200 設定位置 onetextv...