首页 > Lisp 的单行注释和多行注释

Lisp 的单行注释和多行注释

在Lisp中的注释和多行注释

多行注释LISP:

  1. #|
  2. 您的意见在这里
  3. |#

当然,你可以有单行注释,但每行注释前面必须用分号。 一个注释行的分号标题可能是一个或多达4个。 它取决于范围注释。

Comment and Multiline Comment in Lisp

February 5th, 2009
Goto comments Leave a comment

I was a little surprised to find there's so little resource on the Internet about Lisp.Is it really too old to get people interested?



As a beginner, after writing some code, I wanted to find a way to comment out several lines of code to do an A/B test.But surprisingly, I couldn't find any document saying how to do it.Thanks to an email fromZach , I finally know how to do it. So, Multiline comment in LISP:

  1. #|
  2. your comments here
  3. |#

Of course, you could have single-line comments, but each line of comment must be prefaced with semicolon(s).The semicolons heading a line of comment could be one or up to 4.It depends on the scope of the comment.You will understand what scope is from the following example.

  1. ;;;; Four semicolons used for a file header comment


  2. ;;; comment with 3 semicolons usually be a paragraph
  3. (defun foo (x)
  4. (dotimes (ix)
  5. ;; Two semicolons indicate this comment applies
  6. ;; to the code that follows.
  7. (some-function-call)
  8. (another i) ; for this line only
  9. (and-another) ; for this line only
  10. (baz)))
(原文链接在这里 )

转载于:https://www.cnblogs.com/leonxyzh/archive/2012/08/26/7289186.html

更多相关:

  • We have ZZIPlib installed.My command configure line looks like :./configure ?with-apxs ?with-curl ?with-curl-dir=/usr/local/lib ?with-gd ?with-gd-dir=/usr/local ?with-g...

  • asar Whether to package the application’s source code into an archive, using Electron’s archive format. Defaults to true. Node modules, that must be unpacked, will be d...

  • 1.      今天遇到一问题,在sles11/vxworks下编译通过,但是在hpux下失败 2.      编译错误: /usr/ccs/bin/ld:DP relative code in file /projects/xxx/DERIVED/tfa_pa32-hpux.a(tfa02_pa32-hpux.o) -share...

  •         最近买个了小本lenovo x100e,结果发现这小本没有大小写指示灯,在windows用也无妨,不过我常常用这本在ubuntu中调试linux代码,vi 常用的编辑器,熟悉的都知道,大小写很关键的,用google搜了一下,发现可以用如下方法解决:        1.  “sudo apt-get install l...

  •   修改Ubuntu的启动logo 原文链接: https://my.oschina.net/jmjoy/blog/380262     内容:   Plymouth splash screen is the initial splash screen at boot-up.Ubuntu 10.04 uses Plym...

  • WinJS中提供了列表控件ListView,但是对于一些有一些逻辑判断的处理不是十分友好,我们可以使用JavaScript中的模版机制来自己生成列表,然后添加到DOM中。今天要讲的是artTemplate, artTemplate提供一个是否简单的语法并且性能十分不错,有兴趣的可以去Github上查看相关细节。 先来看看最终的运行效果...

  •   之前开始读《C++primer》,想着读书不动笔不如不读书,于是就想做一个读书笔记的内容,于是就想起了写一个《C++primer读思录》的一个专栏。一是为了给自己平时读书做笔记,方便自己随时查看。二是为了督促自己每天学习。三是为了知识的分享。于是《C++primer读思录》专栏开始了。  文章中有技术上错误之处,理解不够深入或者...

  • 使用eclipse那么久了额,对注释和反注释的快捷键一直很模糊,现在记下来,方便查看。 注释和反注释有两种方式。如对下面这段代码片段(①)进行注释: private String value; private String count; public void setValue(String value) { this.value...

  • 1.pycharm 自动换行,显示行号,缩进向导 在代码右侧右键 2.自动注释/取消注释 ctrl + / 转载于:https://www.cnblogs.com/xuesu/p/4755086.html...