[lazarus] Source Code Procedures

Stefan Hille stoppok at osibisa.ms.sub.org
Sat Jul 17 19:57:02 EDT 1999


Hi!

On Fri, Jul 16, 1999 at 11:29:53PM -0500, Cliff Baeseman wrote:
> Gents
> 
>    Do you mind if I put in procedure seperators like I did in the controls
> unit?
> 
> I always comment and put in procedure seperators like this...
> 
> {-------------------------------------------------------------------}
> {TMyType.MyMethod    "comments"                        }
> {-------------------------------------------------------------------}
> Procedure TMyType.MyMethod;
> begin
> end;
> 
> Is anyone opposed to this style? I think it makes it easy to read the code
> in a black and white editor.

It's OK, but we should consider if we also wanna put some kind of
formalized documentation into these comments. I'm not absolutely sure if
this is a good idea in general, but in the current state (where nobody
wants's to maintain a separate documentations file) it could be helpful.

In the long run we can extract those comments again with a simple parser
and convert it to latex or something else.

example:

 {-------------------------------------------------------------------}
 {@@func TMyType.MyMethod                            }
 {                                                   } 
 { This function is useless.                         } 
 {                                                   } 
 { @@parms   owner: the owner of ...                 } 
 {           i:     not used by now                  } 
 {                                                   }
 { @@returns  NIL                                    } 
 {-------------------------------------------------------------------}
 function TMyType.MyMethod (var owner : TComponent; i : integer) : pointer;
 begin
    result := NIL;   
 end. 

bye,

  Stefan

-- 
---------------------------------------------------------
Stefan Hille          email: stoppok at osibisa.ms.sub.org 
48155 Muenster	      voice: 0251/664695 






More information about the Lazarus mailing list