Commenting-Program-Code

Commenting Program Code

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?

  • To explain the code to yourself when you are editing the program nine months in the
    future, adding all those features your users have been asking you about. Memory fades,
    and the most apparent sequence of functions can easily turn into an unrecognizable
    tangle of parentheses.
  • To explain the code to others who inherit the responsibility of updating the program.
    Reading someone else’s code is an extremely frustrating experience, especially if
    the code contains very few 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.

Learning AutoCad

sp computer programming, a comment is a programmer-readable explanation or annotation in the source code of a computer program. They are added with the purpose of making the source code easier for humans to understand, and are generally ignored by compilers and interpreters.program and is only for use by the human reader of the code. use %{ comment %} for Multiline comments (or repeat the % down the left side of your paragraph).Comments to a Program. A comment is a note to yourself (or others) that you put into your source code. All comments are ignored by the compiler.Comments[edit]. Comments are portions of the code ignored by the compiler which allow the user to make simple notes in the relevant areas of the source code.comment your C and C++ code–and how you should do it. … Programs are meant to be beautiful. If someone tells you otherwise, you'd probably …Programming Language, you can place comments in your source code that are not executed as part of the program. Comments provide clarity to the C …… You may have been taught to program by first writing pseudo-code comments then writing the real code into that wire-frame. This is a perfectly …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 …… Comments in many programming languages are discussed including … How can we comment out a hundred lines of code that has comments …Code Documentation: An Engineering Deliverable" in Proceedings of the Technology of Object-Oriented Languages and Systems, 2000.

مطالب مرتبط



ترفند های اتوکد

درباره نویسنده

بنده سیامک دوستداری فارغ التحصیل رشته مکانیک سنگ از دانشگاه صنعتی اصفهان هستم، و در این وبسایت آموزش های مربوط به نحوه برنامه نویسی در اتوکد و هچنین آموزش تصویری دستورات اتوکد را قرار خواهم داد.

تلفن همراه: ۰۹۰۰۱۲۳۴۴۴۴

ایمیل: s.doostdari@gmail.com

نظرات کاربران