21 Oct 2014

VBScript / Classic ASP value equivalency crib sheet


DBNULL VALUE

Equivalent to: NULL

ZERO VALUE 

Equivalent to: FALSE

STRING NUMBER VALUE (e.g "0")

Equivalent to: NUMBER VALUE (but STRING ZERO is not FALSE!)

EMPTY VALUE / UNDEFINED VALUE / UNPROVIDED REQUEST VALUE

Equivalent to: FALSE (but not NULL!)

EMPTY STRING ("")

Not equivalent to FALSE, EMPTY, ZERO or NULL!


NOTE: If you compare NULL with anything, it just returns NULL, not TRUE/FALSE

NOTE: While 0 is equivalent to FALSE, 1 is NOT equivalent to TRUE


No comments:

Post a Comment

Comments are very welcome unless you're a spammer, in which case you should probably kill yourself.

If I helped you out today, you can buy me a beer below. Cheers!