zoukankan      html  css  js  c++  java
  • Lisp 的单行注释和多行注释

    在Lisp中的注释和多行注释

    多行注释LISP:

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

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

    Comment and Multiline Comment in Lisp

    February 5th, 2009

    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)))
    (原文链接在这里 )
  • 相关阅读:
    BZOJ 1007 HNOI2008 水平可见的直线
    BZOJ 3155 Preprefix sum
    BZOJ 1036 ZJOI2008 树的统计
    BZOJ 1096 ZJOI2007 仓库建设
    BZOJ 1012 JSOI2008 最大数maxnumber
    BZOJ 1001 狼抓兔子
    BZOJ 1046 HAOI 上升序列
    [POI2015]PUS
    [NOI2011]道路修建
    POI 2015 KIN
  • 原文地址:https://www.cnblogs.com/leonxyzh/p/7289186.html
Copyright © 2011-2022 走看看