...

View Full Version : difference between dbl and sng



lse123
06-12-2007, 10: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 ?

Daemonspyre
06-12-2007, 01:19 PM
You should bookmark this page, it's the VBScript reference that will give you this information.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/ddfa5183-d458-41bc-a489-070296ced968.asp

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.

HTH!

lse123
06-12-2007, 07:03 PM
what are 64-bit floating-point value, 32-bit floating-point value ? has to do with number range ? what about decimal places ?

Daemonspyre
06-12-2007, 08: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.

Better? :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum