CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

AutoCAD 文档中心

代码注释样式参考 (Visual LISP)

2023-1-8 05:17| 发布者: admin| 查看: 613| 评论: 0|来自: AutoCAD

摘要: Visual LISP 文本编辑器支持五种注释样式。

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

路过

雷人

握手

鲜花

鸡蛋

最新评论

QQ|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 )

GMT+8, 2024-5-19 12:21

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部