Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Dec 2005
    Posts
    702
    Thanks
    0
    Thanked 0 Times in 0 Posts

    difference between dbl and sng

    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 ?

  • #2
    Regular Coder
    Join Date
    Mar 2007
    Posts
    505
    Thanks
    1
    Thanked 19 Times in 19 Posts
    You should bookmark this page, it's the VBScript reference that will give you this information.

    http://msdn.microsoft.com/library/de...0296ced968.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!
    To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
    Please, if you found my post helpful, pay it forward. Go and help someone else today.

  • #3
    Regular Coder
    Join Date
    Dec 2005
    Posts
    702
    Thanks
    0
    Thanked 0 Times in 0 Posts
    what are 64-bit floating-point value, 32-bit floating-point value ? has to do with number range ? what about decimal places ?

  • #4
    Regular Coder
    Join Date
    Mar 2007
    Posts
    505
    Thanks
    1
    Thanked 19 Times in 19 Posts
    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?
    To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
    Please, if you found my post helpful, pay it forward. Go and help someone else today.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •