| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Hi, 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 |
|
#2
| |||
| |||
| Michael Fritz wrote: > 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} 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 |
|
#3
| |||
| |||
| "Rob Kennedy" wrote in message <news:4899a85e$1@newsgroups.borland.com>: > Put a comment above the function name, where nearly all function-level > documentation goes. Rob, thanks for your comments -- cu, Michael |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.