VBScript ASP cdbl () function conversion to double precision type

Source: Internet
Author: User

Cdbl Functions

Returns an expression that has been converted to a variant of the double subtype.

Cdbl (expression)

The expression parameter is any valid expression.

Description
Generally, you can use the subtype Data Conversion Function to write data.Code, To display the results of some operations should be expressed as a specific data type, rather than the 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 to convert data from other data types to double subtypes in internationally recognized formats. For example, the identification of the decimal separator and the thousands separator depends on the system's regional settings.

The following example uses the cdbl function to convert expression to double.

Dim mycurr, mydouble

Mycurr = ccur (234.456784) 'mycurr is a currency type (234.4567 ).

Mydouble = cdbl (mycurr * 8.2*0.01) 'converts the result to double (19.2254576 ).

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.