Lazarus comes with a nice feature: Hover (in code) over a function, procedure or variable, and it will show you some details like parameters and where it's declaration can be found in code.
You can however add COMMENTS to this ... some examples:
Variables:
var
MyVariable : integer; // This variable is used for my project
// Test variable - This works for TestVariable as well
TestVariable : string;
Constants:
const
// MediaTypes (covers both constants)
MovieMedia = 1;
TVShowMedia = 2;
myDummy = 0; // This works as well
// For one only
TestConst : array[1..3] of integer;
(with simple constants the first comment will be displayed on both variables - with complex constants this works only for the following constant)
Functions and procedures in the implementation section:
// This function returns TRUE or FALSE
function TForm1.MyFunction(MyParameter:string):Boolean;
// This function takes MyParameter and does something with it
procedure TForm1.MyProcedure(MyParameter:string);
In the interface section:
function MyFunction(MyParameter:string):Boolean; // This function returns TRUE or FALSE
procedure MyProcedure(MyParameter:string); // This procedure takes MyParameter and does something with it
Now when you hover over for example MyFunction() somewhere in your code, the hint window will say something like (the 3rd line is your comment):
function MyFunction(MyParameter:string):Boolean;
/where/the/sourcefile/is/file.pas
This function returns TRUE or FALSE