|
-
Mar 27th, 2002, 05:52 AM
#1
Thread Starter
Hyperactive Member
Indents please
Another thing I do and would like opinions on:
I only fully left align;
General declarations - not sure if this includes Function & Sub declarations but I mean it to.
Navigational labels
Debug.Prints
Debug MsgBox lines
The last 2 so they are easy to find and remove when the prog is finished.
Any comments?
-
Mar 27th, 2002, 05:55 AM
#2
Fanatic Member
Re: Indents please
Originally posted by GlenW
Another thing I do and would like opinions on:
I only fully left align;
.
.
.
Debug.Prints
Debug MsgBox lines
The last 2 so they are easy to find and remove when the prog is finished.
Any comments?
Very good, I will do the same from now on. I always have problems finding those and deleting them after testing/debugging.
Thanks for a good tip.
-
Mar 27th, 2002, 05:57 AM
#3
Frenzied Member
...Debug.Prints
Debug MsgBox lines
You should define a compile time constant DEBUG and put such lines in:
VB Code:
#IF DEBUG Then
MsgBox "This is a debug thingy"
#End If
That way to remove the msgbox you just unset the compile time directive and compile it...
-
Mar 27th, 2002, 05:58 AM
#4
Bouncy Member
i do exactly the same.
makes code dead easy to read too
-
Mar 27th, 2002, 06:11 AM
#5
PowerPoster
I only put them in when I need them, solve the problem and then take them out again. Then I don't have to worry about it.
-
Mar 27th, 2002, 06:19 AM
#6
Thread Starter
Hyperactive Member
Originally posted by MerrionComputin
You should define a compile time constant DEBUG and put such lines in:
VB Code:
#IF DEBUG Then
MsgBox "This is a debug thingy"
#End If
That way to remove the msgbox you just unset the compile time directive and compile it...
Does this not produce an unnecessary run time overhead?
-
Mar 27th, 2002, 06:21 AM
#7
PowerPoster
No, it doesn't get compiled.
-
Mar 27th, 2002, 06:25 AM
#8
Bouncy Member
i think the term is "Conditional Compilation"
-
Mar 27th, 2002, 06:28 AM
#9
Thread Starter
Hyperactive Member
I learn something new every day
Every day in every way I'm getting better and better.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|