gpt4 book ai didi

lisp - terpri, princ & co.对比格式

转载 作者:太空宇宙 更新时间:2023-11-03 18:41:26 25 4
gpt4 key购买 nike

Common Lisp:符号计算的简要介绍第 9.10 章声称:

The primitive i/o functions TERPRI, PRIN1, PRINC and PRINT were defined in Lisp 1.5 (the ancestor of all modern Lisp systems) and are still found in Common Lisp today. They are included in the Advanced Topics section as a historical note; you can get the same effect with FORMAT.

这意味着您不需要princ & co。而且,在现代代码中,您只应该依赖 format

这样做有什么缺点吗?分别地,是否有任何东西无法通过与其他格式一起使用的 format 实现?

最佳答案

这些函数完全对应下面的FORMAT运营商:

  • TERPRI = ~%
  • FRESH-LINT = ~&
  • PRIN1 = ~S
  • PRINC = ~A
  • PRINT = ~%~S<space>

关于lisp - terpri, princ & co.对比格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29731597/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com