Lazarus

Using the Lazarus IDE => Editor => Topic started by: vfclists on March 15, 2010, 01:28:29 am

Title: How to insert a block comment for a new function
Post by: vfclists on March 15, 2010, 01:28:29 am

I want to create block comments to describe functions. Is there a CodeTools macro for that?

The kind of information blocks source code documentation tools require
Title: RE: How to insert a block comment for a new function;
Post by: guest62577 on June 02, 2018, 07:04:36 pm
creating comment for functions is simple, place a comment right before it's header under TYPE;

Code: Pascal  [Select][+][-]
  1. UNIT1
  2.  
  3. INTERFACE
  4. USES
  5.  
  6. TYPE {...}
  7. //this comment are displayed when hovering cursor at the function name;
  8. function examplefunction:boolean;

[^] however
Code: Pascal  [Select][+][-]
  1. UNIT2
  2.  
  3. INTERFACE
  4. USES
  5.  
  6. {...no type}
  7. //this comment are displayed when hovering cursor at the function name from UNIT1 but not on UNIT2;
  8. function examplefunction_commentissue:boolean;
  9.  
  10. IMPLEMENTATION
  11. //comment from UNIT2 must be placed under implementation - thus an issue around this comment method;
  12. function examplefunction_commentissue:boolean;

Title: Re: How to insert a block comment for a new function
Post by: Martin_fr on June 02, 2018, 09:39:30 pm
Not sure what there is (nor what exactly you need), but you can also look at "Code Templates", which include some macros.
Alternatively you can use pascal-script macros.
TinyPortal © 2005-2018