View Full Version : difference between dbl and sng
06-12-2007, 11:41 AM
what is the difference between dbl and sng ....numbers ? When I submit a form a textbox with a number , what number will be [ dbl or sng ] ? when will be a number or string ?
06-12-2007, 02:19 PM
You should bookmark this page, it's the VBScript reference that will give you this information.
As to your answer, a DOUBLE is a 64-bit floating-point value, while a SINGLE is a 32-bit floating-point value.
When you submit a textbox with a number, the computer (depending on your REGIONAL SETTINGS) will assign the default type. You can always change that information using CDbl or CSng.
06-12-2007, 08:03 PM
what are 64-bit floating-point value, 32-bit floating-point value ? has to do with number range ? what about decimal places ?
06-12-2007, 09:01 PM
I started off this post with a really detailed, overly informative explanation of 32- and 64-bit floating point values.
That was boring...
Here's the quick and dirty:
Floating point values are used either as single precision (32 bit) and double precision (64 bit) numbers.
Single has an accuracy of about 7 decimal digits.
Double has an accuracy of about 16 decimal digits.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.