Stopping number exponentiation

J

Jon

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?
 
B

Bob Barrows [MVP]

Jon said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top