> How are you adding comment sections to your source!?
I agree with traumatic -- I don't comment unless I really think I need to.
Anyway, for short comments, I usually add to the end of a line or command:
If the line has several commands, I usually comment whatever is relevant:
Code: Select all
w=WindowWidth(0)+pgw : h=WindowHeight(0) ; pgw = PanelGadget width.
If a whole line needs commenting, or if the comment is long, I usually
comment the line above it:
Code: Select all
; Next line resizes the window to match the PanelGadget height.
w=WindowWidth(0)+pgw : h=WindowHeight(0)
If a few lines need commenting, I also comment the line above and put a
blank line above that and a blank line below, and call it a block:
Code: Select all
[...code...]
; This block resizes the window to match the PanelGadget height.
w=WindowWidth(0)+pgw
h=WindowHeight(0)
[...code...]
And lastly, if a block of code is very long, I comment like the above one
but add dashes to highlight the block to make it easier to see its start
and end points (although this example is not long, but you get the idea):
Code: Select all
[...code...]
; --------------------------------------------------------------
; This block resizes the window to match the PanelGadget height.
w=WindowWidth(0)+pgw
h=WindowHeight(0)
; --------------------------------------------------------------
[...code...]
And I actually have a new one now: If I have a massive block of code
that I re-use in all apps and it's 100% bug-free, I will now IncludeFile
it to save source size, because I know it'll work fine and I know what
it does, so I don't need the reassurance of seeing it in the main source.
Having said all that, you may see code in these forums by me that don't
conform to all that I've said above -- that's because I change my style
for public code, for whatever reason at the time. But for my own code,
that's how I do it.