ASP (Active Server Pages) is a tool used for making dynamic web pages.
The scripting language used in ASP is VBScript.
There are eight keywords that ASP VB works on. These keywords form the framework of the system and allow the user to make use of the powerful services it offers.
Empty keyword is used to either check or indicate (as per requirement) an uninitialized variable value.
If a variable is declared but not initialized, it has the value
Empty assigned to it by default. The programmer may also choose to assign
Empty to a variable.
Dim my_variable 'The value assigned to my_variable is Empty by default my_variable = 12 'my_variable now has the value 12 stored in it my_variable = Empty 'Empty has now been re-assigned to my_variable
IsEmpty() is a function in ASP VB used to test whether a variable has been initialized or not.
'Let us declare a variable Dim my_variable If (IsEmpty(my_variable)) 'IsEmpty() will return true if the variable is uninitialized and false otherwise
Nothing is associated with an object variable that has not been initialized.
It is also used to disassociate the instance of an object from the object variable, with the goal of releasing system resources.
'Let us declare an object variable Dim my_obj Set my_obj = Nothing 'This sets my_obj to Nothing. No instance has been declared yet, hence, bare minimum system resources have been utilized
IsNothing() is a function used to test if an object variable has been initialized with an instance or not.
'Let us declare an object variable Dim my_obj If (IsNothing(my_obj)) 'IsNothing() will return true if the object variable has not been assigned an instance and vice versa
Null keyword is used to exhibit that no valid data has been assigned to this variable. It is important to understand that
Null are not the same thing.
Empty means no data (i.e., an empty set) has been assigned to the variable,
Null symbolizes that no valid data (i.e., incompatible set) has been assigned.
'Let us declare a variable Dim my_var my_var = Null 'This sets my_var to Null. No valid data has been associated.
IsNull() is a function used to test whether invalid data is stored in a variable.
Dim my_var my_var = Null If (IsNull(my_var)) 'IsNull() will return true if the variable has not been assigned any valid data and vice versa
Like any other language,
True is a boolean indicator of a condition that is correct.
False is a boolean indicator used to mark a condition that is untrue.
View all Courses