From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_05,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8eaea1d1465f843d X-Google-Attributes: gid103376,public From: ennals@aol.com Subject: Re: Comments Date: 1996/11/13 Message-ID: <19961113121001.HAA20548@ladder01.news.aol.com>#1/1 X-Deja-AN: 196200954 sender: news@aol.com references: <328828AA.4EF6@wantree.com.au> organization: America Online, Inc. (1-800-827-6364) (1.10) newsgroups: comp.lang.ada Date: 1996-11-13T00:00:00+00:00 List-Id: In article <328828AA.4EF6@wantree.com.au>, Hercules Gunter writes: > >re: automatic commenting of Ada programs > >The point of comments is to explain the non-obvious bits of the code. >It's quality that counts, not quantity. Anything you can generate >automatically would have to be fairly obvious and of no use to the >person coming later who needs to understand the code. This is a job for >the human who write the code, or the poor maintenance programmer who had >to figure it out later. It can be useful for describing what function calls etc do. For example I might write a procedure (fake code) procedure brcp(s : screen ; i : image ; c : colours); #desc Build Really Cool Picture on screen %s of image %i with %c colours Then when I type brcp(myscreen, megaimage, 256); the comment would be: #com Build really coop picture on screen myscreen of image megaimage with 256 colours. #desc and #com are just example preprocessor tags. You could make them anything. When you asked the system to parse some source code it would replace any #com comments with new ones if there had been changes. Similar tags can be given for variables and structures. This system can give surprisingly good results :-)) Often somebody looking at someone elses code won't know what all the functions and variables are and this kind of system can quickly make code much more readable. (excuse the AOL email address) ******************************************************************** Robert Ennals / email: ennals@aol.com url: http://members.aol.com/ennals/index.html TaskBar / MemManager / Bubble (visual programming) etc "If at first you don't succeed, redefine 'succeed' "