View Single Post
  #4  
Old 07-03-2007, 09:41
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default

Let me post a few general comments about this code. Let's start with some comparison statements. I'd never compare Booleans to their actual values. Instead of:

Code:
If expr = True Then ...
I would just use:

Code:
If expr Then ...
and vice versa, instead of:

Code:
If expr = False Then ...
use:

Code:
If Not expr Then ...
It's shorter and a bit less error prone (some methods might return values other than True [-1] or False [0] as a Boolean value and comparing it to True will not work, however using just "If expr Then" will succeed for any non-zero value of "expr").
Reply With Quote