VBScript IsEmptyFunction
Complete VBScript Reference Manual
The IsEmpty function returns a Boolean value indicating whether the specified variable has been initialized. It returns True if the variable has not been initialized; otherwise, it returns False.
Syntax
IsEmpty(expression)
| Parameters | Description |
|---|---|
| expression | Required. An expression (usually a variable name). |
Examples
Examples
<script type="text/vbscript">
Dim x
document.write(IsEmpty(x) & "<br />")
x=10
document.write(IsEmpty(x) & "<br />")
x=Empty
document.write(IsEmpty(x) & "<br />")
x=Null
document.write(IsEmpty(x))
</script>
Dim x
document.write(IsEmpty(x) & "<br />")
x=10
document.write(IsEmpty(x) & "<br />")
x=Empty
document.write(IsEmpty(x) & "<br />")
x=Null
document.write(IsEmpty(x))
</script>
The output of the above example is:
True
False
True
False
False
True
False
Try it yourself »
Complete VBScript Reference Manual Other Extensions