craymel Posted December 17, 2005 Share Posted December 17, 2005 Hi , can someone explain what does CDbl does ? Link to comment Share on other sites More sharing options...
smiles Posted December 19, 2005 Share Posted December 19, 2005 Just like " EXP" key in your caculator , it's really nice for math homeworks with logarism ! . Similar to computer , it needs less memory to process numbers so doing it is faster !!!Look at example of w3 :dim aa=14111111113353355.345455document.write(CDbl(a))Output:1.41111111133534E+16 Link to comment Share on other sites More sharing options...
dhsd6061 Posted December 22, 2005 Share Posted December 22, 2005 Cdbl is a function to convert a number to the data type 'Double'. What this typically means is that a number defined as a byte, integer and long have nothing to right side of the decimal... ie. whole numbers. Defining a number as a double lets you contain this fractional data and also to display it. <% Response.write(cint(9 * .5) & "</br>") %>this outputs 4 because the answer 4.5 is converted to an integer.Check out these other converstion functions. Cstr, Cdate, Cint, Clng, Ccur, etc. One final hint for you, the syntax of these functions are typical of MS Visual Basic /vbscript.search for 'visual basic data type conversion'good luck. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now