Collected and sorted out some common judgment functions of ASP
<1>isarray function
Returns a Boolean value that indicates whether a variable is an array.
Grammar
IsArray (varname)
The varname parameter can be any variable.
Description
If the variable is an array, the IsArray function returns TRUE, otherwise the function returns FALSE. Using the IsArray function works well when a variable contains an array.
<2>isdate function
Returns a Boolean value that indicates whether an expression can be converted to a date.
Grammar
IsDate (expression)
The expression parameter can be any date expression or string expression that can be recognized as a date and time.
Description
The IsDate function returns True if the expression is a date or can be legitimately converted to a valid date, otherwise the function returns FALSE. Valid date range in Microsoft Windows operating system A.D. January 1, 100 to A.D. December 31, 9999; The legal date range varies depending on the operating system.
<3>isempty function
Returns a Boolean value that indicates whether the variable has been initialized.
Grammar
IsEmpty (expression)
The expression parameter can be any expression. However, because IsEmpty is used to determine whether a variable has been initialized, the expression argument is often a variable name.
Description
If the variable is uninitialized or explicitly set to Empty, the function isempty returns True; otherwise, the function returns FALSE. If expression contains more than one variable, the total returns FALSE.
<4>isnull function
Returns a Boolean value that indicates whether the expression does not contain any valid data (Null).
Grammar
IsNull (expression)
The expression parameter can be any expression.
Description
If expression is Null, IsNull returns True, that is, the expression does not contain valid data, or the IsNull returns FALSE. If expression is composed of multiple variables, Null in any constituent variable of the expression will return True for the entire expression.
A Null value indicates that the variable does not contain valid data. Null differs from Empty, which indicates that the variable was uninitialized. Null is also different from a 0-length string (""), and a 0-length string often refers to an empty string.
Focus on using the IsNull function to determine whether an expression contains a Null value. In some cases, you want the expression to be value True, such as Ifvar=null and Ifvar<>null, but they are usually always False. This is because any expression containing a null itself is null, so the expression evaluates to False.
<5>isnumeric function
Returns a Boolean value that indicates whether the expression's value is a number.
Grammar
IsNumeric (expression)
The expression parameter can be any expression.
Description
If the entire expression is recognized as a number, the IsNumeric function returns True; otherwise, the function returns FALSE.
If expression is a date expression, the IsNumeric function returns FALSE.
<6>isobject function
Returns a Boolean value that indicates whether the expression refers to a valid Automation object.
Grammar
IsObject (expression)
The expression parameter can be any expression.
Description
IsObject returns True If expression is an object subtype variable or user-defined object, otherwise the function returns FALSE.