Why "(Null == Null)" is "Null" instead of logically "True"?

Why on VB6 (Null = Null) is not logically True?
Please see http://img11.imageshack.us/img11/8053/34198907.jpg
(I just want to add some features to an old VB6 application I wrote few years ago.)

mark r2009-02-28T05:32:21Z

Favorite Answer

Null has no value so it isn't possible to compare Null with Null.

you need to use the IsNull() function to get a True/False check.

Note to people saying = means assignment here.
In VBA and almost certainly VB6 = is a test rather than assignment.
This is shown in a Microsoft example here:
http://msdn.microsoft.com/en-us/library/752y8abs(VS.80).aspx

In languages such as C++ == is used for equality tests but not in VB.

Anonymous2009-02-28T07:02:37Z

You used a single = operator which means you actually assigned the value of NULL to Null. Since NULL has no value, it returned False.

covinher2009-02-28T06:49:26Z

One = or two? Usually assignment evaluates to whatever you assigned from.

edit: screenshot says you're doing assignment, not comparison. That's your bug.