IsEmpty Function

Tips >>ASP Functions

WANTS TO MAKE SOFTWARE WITHOUT KNOWLEDGE OF ASP? CLICK HERE

The IsEmpty function returns a Boolean value that indicates whether a specified variable has been initialized or not. It returns true if the variable is uninitialized; otherwise, it returns False. The expression argument can be any expression. However, because IsEmpty is used to determine if individual variables are initialized, the expression argument is most often a single variable name. The IsEmpty function returns True when passed a Variant that has been declared but not initialized. It returns False in all other cases.

The Syntax of the IsEmpty function is :-

IsEmpty(expression)

Example#1 :-

Code :-
dim x
document.write(IsEmpty(x) & "<br />")
x=10
document.write(IsEmpty(x) & "<br />")
x=Empty
Output :-

True
False

Example#2 :-

Code :-
<% =IsEmpty(notbeen) %>
Output :-
True

Example#3 :-

Code :-
<% =IsEmpty("This is a string.") %>
Output :-
False

Example#4 :-

Code :-
dim x
document.write(IsEmpty(x) & "<br />")
x=Null
document.write(IsEmpty(x))
Output :-
True
False

 
E-mail : sales@virtualsplat.com
Phone : +91-9892413501

Whatsapp Icon +91-9967648641

Whatsapp Icon +91-9967648641