Recent

Author Topic: How to insert a block comment for a new function  (Read 5792 times)

vfclists

  • Hero Member
  • *****
  • Posts: 1013
    • HowTos Considered Harmful?
How to insert a block comment for a new function
« 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
Lazarus 3.0/FPC 3.2.2

guest62577

  • Guest
RE: How to insert a block comment for a new function;
« Reply #1 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;


Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Re: How to insert a block comment for a new function
« Reply #2 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