VBScript ASP CDBL () function conversion to double precision type _ Application Tips

Source: Internet
Author: User
CDBL function

Returns an expression that has been converted to a Variant of the Double subtype.

CDBL (expression)

The expression parameter is any valid expression.

Description
Typically, you can use subtype data conversion functions to write code to show that the results of certain operations should be expressed as a specific data type, not as a default data type. For example, in the case of currency or integer operations, use the CDBL or CSng function to force double or single-precision arithmetic operations.

The CDBL function is used for internationally recognized format conversions from other data types to Double subtypes. For example, the recognition of the decimal separator and the thousand separator depends on the locale of the system.

The following example uses the CDBL function to convert expression to Double.

Dim Mycurr, MyDouble

Mycurr = CCur (234.456784) ' Mycurr is Currency type (234.4567).

MyDouble = CDBL (Mycurr * 8.2 * 0.01) ' Converts the result to a Double (19.2254576).
Related Article

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.