Description: Set Aa=server.createobject ("DDD")
ISNULL description pointer is null, pointer to an invalid position, that is, the object does not exist,
IsEmpty Note the pointer points to a valid location, but the value is null
1, empty string
Cases:
Copy Code code as follows:
A) Dim strtmp
Response.Write (strtmp= "") ' returns True
b) Response.Write (str= "") ' returns True
c) Dim strtmp
Strtmp= ""
Response.Write (strtmp= "") ' returns True
These lines of code indicate whether the ASP is a variable that has not been declared or a variable that makes a declaration but does not assign a value that is considered an empty string or is called a 0-length string.
2, IsEmpty ()
If the variable is not initialized or explicitly set to Empty, the function IsEmpty returns True;
Otherwise, the function returns FALSE. If expression contains more than one variable, the total returns FALSE.
Cases:
Copy Code code as follows:
A) Dim strtmp
Response.Write (IsEmpty (strtmp)) ' Returns True
b) Dim strtmp
strtmp = Null
Response.Write (IsEmpty (strtmp)) ' Return flase
c) Dim strtmp
strtmp = Empty
Response.Write (IsEmpty (strtmp)) ' Returns True
d) Dim strtmp
strtmp = ""
Response.Write (IsEmpty (strtmp)) ' Return flase
3, IsNull ()
A Null value indicates that the variable does not contain valid data. Null differs from Empty, which indicates that the variable was uninitialized. Null is also different from a 0-length string (""), and a 0-length string often refers to an empty string.
You can use the IsNull function to determine whether an expression contains a Null value.
Cases:
Copy Code code as follows:
a) Dim strtmp
Response.Write (IsNull (strtmp)) ' Returns False
B ' Response. Write (IsNull (strtmp)) ' Return False note here strtmp is an undeclared variable
a) Dim strtmp
strtmp = Null
Response.Write (s trtmp)) ' returns True
a) Dim strtmp
strtmp = Empty
Response.Write (IsNull (strtmp)) ' Returns False