Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
gnu clispからのアクションを理解していないものがあります。たとえば、のようなコードがあります (let ((x "Hi!"))(print x))。コンソール(clisp fileName.lispなど)から実行すると、次のように表示されます。
(let ((x "Hi!"))(print x))
やあ!
しかし、インタプリタから実行すると、このテキストが2回表示されます。なんで?
お願い助けて。
インタプリタは常に最後の式の値を出力します。 printまた、あなたの場合、パラメータを値として返します"Hi!"。 それがあなたがそれを二度見る理由です。
print
"Hi!"
(print "Hi!")
同じ結果になります。