ASP determines whether it is null and user-defined functions
ASP 08:38:33 read 12 comments 0 font size: large and small subscriptions
Determines whether the specified object is null, including most cases, such as empty arrays, empty strings, empty, and null objects.
01 |
Private Function IsBlank(byref TempVar) |
03 |
Select Case VarType(TempVar) |
04 |
Case 0, 1 '--- Empty & Null |
07 |
If Len(TempVar) = 0 Then |
11 |
tmpType = TypeName(TempVar) |
12 |
If (tmpType = "Nothing") Or (tmpType = "Empty") Then |
15 |
Case 8192, 8204, 8209 '--- Array |
16 |
If UBound(TempVar) = -1 Then |
The vartype function returns the following values:
| Constant |
Value |
Description |
| Vbempty |
0 |
Empty (not initialized) |
| Vbnull |
1 |
NULL (no valid data) |
| Vbinteger |
2 |
Integer |
| Vblong |
3 |
Long Integer |
| Vbsingle |
4 |
Single-precision floating point number |
| Vbdouble |
5 |
Double-precision floating point number |
| Vbcurrency |
6 |
Currency |
| Vbdate |
7 |
Date |
| Vbstring |
8 |
String |
| Vbobject |
9 |
Automation Object |
| Vberror |
10 |
Error |
| Vbboolean |
11 |
Boolean |
| Vbvariant |
12 |
Variant (used only with the variable array) |
| Vbdataobject |
13 |
Data Access Object |
| Vbbyte |
17 |
Bytes |
| Vbarray |
8192 |
Array |