注释对程序员和可能需要修改程序以满足其需求的未来用户都很有用。 在所有 AutoLISP 程序文件(无论大小)中包含注释是一种很好的编码习惯。使用注释执行以下操作:
注释以一个或多个分号 (;) 开头,一直到行尾。 ; This entire line is a comment (setq area (* pi r r)) ; Compute area of circle | ... | 中的任何文本;被忽略。因此,注释可以包含在一行代码中,也可以扩展为多行。这种类型的注释称为内联注释。 (setq tmode ;|some note here|; (getvar "tilemode")) 下面的示例显示跨多行继续的注释: (setvar "orthomode" 1) ;|comment starts here and continues to this line, but ends way down here|; (princ "\nORTHOMODE set On.") |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 )
GMT+8, 2024-6-10 18:44
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.