【问题标题】:Lisp - string concatLisp - 字符串连接
【发布时间】:2014-09-02 22:03:29
【问题描述】:

我正在尝试在 lisp 中连接字符串,在 linux 上使用 clisp。
我运行以下代码:

(defun bingo ()
  (strcat "Correct! You guessed " (itoa *count*) " times."))

但是,得到以下错误:

EVAL: undefined function STRCAT
EVAL: undefined function ITOA

有什么建议吗?

【问题讨论】:

  • 使用concatenate 而不是strcat
  • @bluebelle 谢谢你,你能告诉我哪个函数用于将 int 转换为 string 吗?
  • 现在您明白为什么您的问题被否决了吗?即使我从来没有在 Common Lisp 中编程过,也可以自己用谷歌搜索答案:)

标签: lisp clisp


【解决方案1】:
CL-USER 1 > (format nil "This is too easy. ~a day I'll learn Lisp." 1)
"This is too easy. 1 day I'll learn Lisp."

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-03-31
    • 1970-01-01
    • 2010-10-17
    • 1970-01-01
    相关资源
    最近更新 更多