Commenting Program Code

Visual LISP treats any AutoLISP statement beginning with a semicolon as a comment. The last two code examples contained a lot of comments. A comment in an AutoLISP program is something you write for yourself, not for the program. Commenting code is one of the best programming practices you can establish for yourself. Why write comments?

Visual LISP contains some utilities that help you as you comment your code. Notice some comments in the examples begin with three semicolons (;;;), sometimes two (;;), and sometimes just one (;).

To save space, the remaining code examples in this tutorial do not include all the comments in the sample source files. It is assumed you have already established the beneficial habit of extensive commenting and will do so without any prompting.