Overview of ASP judgment Functions

Source: Internet
Author: User

<1> isarray Function
ReturnBoolean indicates whether a variable is an array.

Syntax
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. When the variable contains an array, the isarray function is very effective.

<2> isdate Function
ReturnBoolean indicates whether an expression can be converted to a date.

Syntax
Isdate (expression)
The expression parameter can be any date expression or string expression that can be recognized as a date or time.

Description
If the expression is a date or can be legally converted to a valid date, the isdate function returns true; otherwise, the function returns false. In Microsoft Windows, the valid date range is from January 1, 100 AD to December 31, 9999 AD. valid date ranges vary with the operating system.

<3> isempty Function
ReturnBoolean indicates whether the variable has been initialized.

Syntax
Isempty (expression)
The expression parameter can be any expression. However, because isempty is used to determine whether a variable has been initialized, the expression parameter is often a variable name.

Description
If the variable is not initialized or explicitly set to empty, the isempty function returns true; otherwise, the function returns false. If expression contains more than one variable, false is always returned.

<4> isnull Function
ReturnBoolean value, indicating whether the expression does not contain any valid data (null ).

Syntax
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. Otherwise, isnull returns false. If expression is composed of multiple variables, null in any component variable of the expression returns true for the entire expression.
Null indicates that the variable does not contain valid data. Null is different from empty, which indicates that the variable is not initialized. Null is also different from a zero-length string (""). A zero-length string usually refers to an empty string.

Key PointsThe isnull function can be used to determine whether the expression contains a null value. In some cases, you want to set the expression value to true, for example, ifvar = NULL and ifvar <> null, but they are always false. This is because any expression containing null itself is null, so the result of the expression is false.

<5> isnumeric Function
ReturnBoolean indicates whether the expression value is a number.

Syntax
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 Functions
ReturnBoolean indicates whether the expression references a valid Automation Object.

Syntax
Isobject (expression)
The expression parameter can be any expression.

Description
If expression is an object sub-type variable or a custom object, isobject returns true; otherwise, the function returns false.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.