Is functions

The  functions (also known as data information functions, data inspection functions, or data-testing functions) are a set of functions in Microsoft's Visual Basic 6, Visual Basic for Applications, VBScript, and Visual Basic .NET. Several of them are also provided in Transact-SQL by the .NET Framework Data Provider for Microsoft SQL Server.

What the functions do
The functions are simple data validation and data type checking functions. The data validation functions determine whether it is possible to convert or coerce the data value given as an argument to the function to the type implied by the function name, and return a  value recording whether it was possible or not. (Note that the actual data conversion functions, such as  throw exceptions if conversion is not possible.  The validation functions allow one to test whether a conversion would fail, and change the program's flow of control in an if statement.)    indicates that conversion would be possible,   indicates that it would not be. Similarly the type checking functions return a  recording whether the argument expression is of a particular type.

In Transact-SQL, the functions return zero or one rather than  values   and.
 * This function determines whether the variable name passed as its argument is an array. Uninitialized arrays will, note, return   from this function in Visual Basic .NET. In Visual Basic 6, arrays are not reference types, and an uninitialized array will return   from this function just like an initialized array.
 * This function determines whether the variable name passed as its argument is an array. Uninitialized arrays will, note, return   from this function in Visual Basic .NET. In Visual Basic 6, arrays are not reference types, and an uninitialized array will return   from this function just like an initialized array.


 * This function determines whether the expression passed as its argument can be converted to a variable of type, or is already of type  .  Uninitialized variables that are of type   can of course be converted, despite being uninitialized, so this will always return   for such variables.  Note that strings that contain a day of the week in addition to a date (e.g.  ) will return a failure result.  In VBScript and Visual Basic .NET, the conversion process employs the locale settings of Microsoft Windows, meaning that what may parse as a date on one system, configured to use one locale, may fail to parse as a date on another system, configured to use a different locale.
 * This function determines whether the expression passed as its argument can be converted to a variable of type, or is already of type  .  Uninitialized variables that are of type   can of course be converted, despite being uninitialized, so this will always return   for such variables.  Note that strings that contain a day of the week in addition to a date (e.g.  ) will return a failure result.  In VBScript and Visual Basic .NET, the conversion process employs the locale settings of Microsoft Windows, meaning that what may parse as a date on one system, configured to use one locale, may fail to parse as a date on another system, configured to use a different locale.


 * This function determines whether the expression passed as its argument evaluates to .  This is equivalent to Visual Basic 6's   function.  Note that it is not possible to directly compare an expression for equality to , because any expression of the form   will evaluate to   simply because it contains a null.    is the only way to test for equality to.
 * This function determines whether the expression passed as its argument evaluates to .  This is equivalent to Visual Basic 6's   function.  Note that it is not possible to directly compare an expression for equality to , because any expression of the form   will evaluate to   simply because it contains a null.    is the only way to test for equality to.


 * This function determines whether the expression passed as its argument is an uninitialized variant. Note that an uninitialized variant is distinct from a variant that has been initialized to hold  .  Although the function takes an expression, rather than simply a variable name, any expression that isn't simply a variable name is considered not to be an uninitialized variant.  This function was available in Visual Basic 6, but has been superseded in Visual Basic .NET by the   function.  In VBScript, if a variant is assigned , this function still returns.
 * This function determines whether the expression passed as its argument is an uninitialized variant. Note that an uninitialized variant is distinct from a variant that has been initialized to hold  .  Although the function takes an expression, rather than simply a variable name, any expression that isn't simply a variable name is considered not to be an uninitialized variant.  This function was available in Visual Basic 6, but has been superseded in Visual Basic .NET by the   function.  In VBScript, if a variant is assigned , this function still returns.


 * This function, in Visual Basic .NET, determines whether the expression passed as its argument is an exception object, i.e. an object of the  class or one of its subclasses.  In Visual Basic 6, the function tests whether the expression is a variant with the special   subtype.
 * This function, in Visual Basic .NET, determines whether the expression passed as its argument is an exception object, i.e. an object of the  class or one of its subclasses.  In Visual Basic 6, the function tests whether the expression is a variant with the special   subtype.


 * This function determines whether the variable name passed as its argument is an optional argument that was not passed to a function by its caller. It returns   only of the variable is a variant that has not been initialized.  This function only exists in Visual Basic 6.  In Visual Basic .NET, optional parameters are required to have default initializers, and the function no longer exists.
 * This function determines whether the variable name passed as its argument is an optional argument that was not passed to a function by its caller. It returns   only of the variable is a variant that has not been initialized.  This function only exists in Visual Basic 6.  In Visual Basic .NET, optional parameters are required to have default initializers, and the function no longer exists.


 * This function determines whether the expression passed as its argument evaluates to .  It is a simple library function (comprising just 4 CIL instructions) which can itself be written in Visual Basic as:    The effect of this is to return   for all value (non-reference) expressions, because they will be wrapped up, as part of the function call, into objects, which will by their very natures, not be null objects.  To avoid this behaviour, one can use the   operator to compare an object directly to , writing    rather than  .  The compiler will raise a compile-time error if the compared expression is a value rather than a reference type, catching the type mismatch at compile time rather than simply returning   at run-time.  Strings are reference types in Visual Basic .NET, and so capable of being null (as opposed to simply zero-length, empty, strings).  For such strings, this function returns  .  (For empty strings it returns  .)
 * This function determines whether the expression passed as its argument evaluates to .  A null value in any sub-expression of the expression causes the entire expression to be considered null.
 * This function determines whether the expression passed as its argument evaluates to .  A null value in any sub-expression of the expression causes the entire expression to be considered null.
 * This function determines whether the expression passed as its argument evaluates to .  A null value in any sub-expression of the expression causes the entire expression to be considered null.


 * This function, taking two arguments, is specific to Transact-SQL. In contrast to the Visual Basic function by this name, it does not return a , but instead returns the first expression if that is not  , otherwise the second expression.  The purpose of the function is to replace any   values with another, presumably (but not required to be) non- , value.  It is a two-argument version of.
 * This function, taking two arguments, is specific to Transact-SQL. In contrast to the Visual Basic function by this name, it does not return a , but instead returns the first expression if that is not  , otherwise the second expression.  The purpose of the function is to replace any   values with another, presumably (but not required to be) non- , value.  It is a two-argument version of.


 * This function determines whether the expression passed as its argument can be converted to a number (be that a,  ,  ,  ,  , or  ) from a character or string, or is already a number.  In Transact-SQL, strings can be converted to numbers even if they contain characters that one might not expect in numbers.  This is because Transact-SQL allows conversion from   and   types to numbers, and monetary data in string form may contain currency indicator characters such as the ' ' or ' ' symbols.  The same is true of VBScript, where any string that can be converted to a currency value in the current locale is considered to be numeric.  VBScript does not, however, consider dates and times to be numeric.
 * This function determines whether the expression passed as its argument can be converted to a number (be that a,  ,  ,  ,  , or  ) from a character or string, or is already a number.  In Transact-SQL, strings can be converted to numbers even if they contain characters that one might not expect in numbers.  This is because Transact-SQL allows conversion from   and   types to numbers, and monetary data in string form may contain currency indicator characters such as the ' ' or ' ' symbols.  The same is true of VBScript, where any string that can be converted to a currency value in the current locale is considered to be numeric.  VBScript does not, however, consider dates and times to be numeric.


 * This function determines whether the expression passed as its argument is an object rather than a value. This is equivalent to Visual Basic .NET's   function.
 * This function determines whether the expression passed as its argument is an object rather than a value. This is equivalent to Visual Basic .NET's   function.


 * This function determines whether the expression passed as its argument is a reference rather than a value. This is equivalent to Visual Basic 6's   function.
 * This function determines whether the expression passed as its argument is a reference rather than a value. This is equivalent to Visual Basic 6's   function.