Visual LISP 文本编辑器支持五种注释样式。
注意:Visual LISP IDE 仅在 Windows 上可用。
下表列出了每种受支持的注释样式。
注释样式
|
批注格式
|
格式化外观
|
;|内联|;
|
单行注释在格式化后显示为任何其他表达式;多行注释从新行开始显示
|
;单分号
|
从注释列位置开始,由“单分号注释缩进”格式选项定义
|
;;当前列
|
注释从新行开始显示,缩进与程序代码的最后一行相同
|
;;;标题或 0 列
|
显示在新行上,不带缩进
|
;_功能关闭
|
紧跟在上一个表达式之后
|
下面的示例代码演示了每种注释样式。
- 初始文本:
-
(defun foo (x)
;|inline comment |;
(list 1 2 3) ;comment-column comment
;;current-column comment
;;; heading or 0-column comment
) ;_ function-closing comment
- 格式化文本:
-
(defun foo (x) ;|inline comment |;
(list 1 2 3) ;comment-column comment
;;current-column comment
;;; heading or 0-column comment
) ;_ function-closing comment
|