Using the {$REGION} directive I can add a comment which gets displayed when
I collapse the appropriate line(s), e.g.:
{$REGION 'Add column header for available columns grid'}
[..]
{$ENDREGION}
Can I do sthg similar with functions and procedures in Turbo Delphi Pro? I
can collapse those lines (and others too) but I would like to see a comment
behind the function name.
I successfully did this using a line like:
procedure DBClearDefaultLayout {Clear default layout in DB};
begin
[..]
end;
Collapsing the first line shows me the comment but Is there another way to
do this?
--
cu,
Michael
That really looks more like the comment for code that should be in a
function of its own. Use regions for groups of functions, not for
sections of single functions.
> Can I do sthg similar with functions and procedures in Turbo Delphi Pro? I
> can collapse those lines (and others too) but I would like to see a comment
> behind the function name.
>
> I successfully did this using a line like:
> procedure DBClearDefaultLayout {Clear default layout in DB};
That's a pointless comment. All it does is echo the function name. I'm
not sure what the function does, though. Is there a layout of something
stored in the database, and this function removes it (deletes rows)? Or
does this function clear the layout of the database itself (drops whole
tables)?
> begin
> [..]
> end;
>
> Collapsing the first line shows me the comment but Is there another way to
> do this?
Put a comment above the function name, where nearly all function-level
documentation goes.
--
Rob
> Put a comment above the function name, where nearly all function-level
> documentation goes.
Rob, thanks for your comments
--
cu,
Michael