Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 1999-07

Source Code Procedures

8 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author
to Cliff Baeseman: Gents Do you mind if I put in procedure seperators like I did in the controls unit? I…
Cliff Baeseman wrote 13 lines
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;

I think this is a very good idea; I myself use

{ --------------------------------------------------------------------- Some text
---------------------------------------------------------------------}

In all editors I use, I have templates which insert this, and which put the cursor on where the 'S' of 'Some text' should come.

(Simple suggestion for the editor : Code templates !!)

Michael.

Reply by email

Cliff Baeseman

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.

If there is little or no opposition I will go thru the units again...

Cliff

Cliff

Reply by email

Stefan Hille
to Cliff Baeseman: Gents Do you mind if I put in procedure seperators like I did in the controls unit? I…

Hi!

Cliff Baeseman wrote 16 lines
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: 48155 Muenster voice: 0251/664695

Reply by email

Cliff Baeseman

That may be a good idea. It would make documentation easier in the long run..

I will be going thru all the code today and tomorrow cleaning and commenting...

Forms is done...

Cliff

Earlier message 68 lines
-----Original Message----- From: Stefan Hille To: Date: Saturday, July 17, 1999 7:15 PM Subject: Re: [lazarus] Source Code Procedures >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: >48155 Muenster voice: 0251/664695 > >_________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus >

Reply by email

Unknown author
to Stefan Hille: Hi! It's OK, but we should consider if we also wanna put some kind of formalized…
Stefan Hille wrote 44 lines
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.

In that case, consider 'pasdoc' it's written for FPC and does exactly this; it transforms source comments into HTML or Tex documentation; complete with cross-references and all.

You can find a URL on the FPC webpage.

Michael.

Reply by email

Stefan Hille
to Stefan Hille: Hi! It's OK, but we should consider if we also wanna put some kind of formalized…

Hi!

Show quoted text 6 lines
On Sat, 17 Jul 1999, Stefan Hille wrote: > [... documentation in source ...] In that case, consider 'pasdoc' it's written for FPC and does exactly this; it transforms source comments into HTML or Tex documentation; complete with cross-references and all.

Does everybody agree on rhis approach?

You can find a URL on the FPC webpage.

I did not find it, could you please send the URL to this list. Thanks...

bye,

Stefan

--------------------------------------------------------- Stefan Hille email: 48155 Muenster voice: 0251/664695

Reply by email

Unknown author
to Stefan Hille
Stefan Hille wrote 15 lines
Hi! On Sun, Jul 18, 1999 at 12:45:13PM +0200, wrote: > On Sat, 17 Jul 1999, Stefan Hille wrote: >> [... documentation in source ...] > > In that case, consider 'pasdoc' it's written for FPC and does exactly this; > it transforms source comments into HTML or Tex documentation; complete with > cross-references and all. Does everybody agree on rhis approach? > You can find a URL on the FPC webpage. I did not find it, could you please send the URL to this list. Thanks...

Sorry, it seems that link has disappeared, I added it again, but here it is:

http://www.geocities.com/SiliconValley/Lakes/6686/pasdoc.html

Michael.

Reply by email