Stopping number exponentiation

Discussion in 'ASP General' started by Jon, Jul 8, 2008.

  1. Jon

    Jon Guest

    I want to trim a number and display the integer and decimals
    separately, as such I'm trying to convert it to a string so I can
    truncate it.

    No matter what combination of int or CStr I try, VBScript displays
    long numbers such as:

    345332523545325425235255453.6789555

    in its exponentiated form:

    3.45332523545325E+26

    How can I stop this?

    Alternatively is there a function that will separate the two for me?
    Jon, Jul 8, 2008
    #1
    1. Advertising

  2. Jon wrote:
    > I want to trim a number and display the integer and decimals
    > separately, as such I'm trying to convert it to a string so I can
    > truncate it.
    >
    > No matter what combination of int or CStr I try, VBScript displays
    > long numbers such as:
    >
    > 345332523545325425235255453.6789555
    >
    > in its exponentiated form:
    >
    > 3.45332523545325E+26
    >
    > How can I stop this?
    >
    > Alternatively is there a function that will separate the two for me?


    Please don't multipost.
    I really don't understand why you posted this here. You got a very thorough
    explanation of the problem, as well as some good workarounds, in the thread
    you started in .scripting.vbscript. There really is nothing any of us will
    be able to add to what you received there.If what they have written makes no
    sense to you, the polite thing to do would be to post a reply in that thread
    explaining what you do not understand or asking how to apply what they have
    explained to you. As you can tell, the participants in that thread like to
    type and would be happy to help you understand what they've said.


    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Jul 8, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steven T. Hatton

    An exponentiation function for int?

    Steven T. Hatton, Oct 13, 2004, in forum: C++
    Replies:
    14
    Views:
    726
    JXStern
    Oct 16, 2004
  2. Jeff Davis

    strange exponentiation performance

    Jeff Davis, Nov 23, 2003, in forum: Python
    Replies:
    0
    Views:
    328
    Jeff Davis
    Nov 23, 2003
  3. Tim Peters
    Replies:
    1
    Views:
    421
    Jeff Davis
    Nov 24, 2003
  4. elventear

    Decimal and Exponentiation

    elventear, May 19, 2006, in forum: Python
    Replies:
    7
    Views:
    621
    Tim Peters
    May 20, 2006
  5. exponentiation operator (lack of)

    , Dec 22, 2005, in forum: C Programming
    Replies:
    67
    Views:
    1,437
    Dave Thompson
    Jan 4, 2006
Loading...

Share This Page