Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Stopping number exponentiation

Reply
Thread Tools

Stopping number exponentiation

 
 
Jon
Guest
Posts: n/a
 
      07-08-2008
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?
 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      07-08-2008
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"


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Decimal and Exponentiation elventear Python 7 05-20-2006 07:04 PM
exponentiation operator (lack of) carlos@colorado.edu C Programming 67 01-04-2006 05:27 AM
An exponentiation function for int? Steven T. Hatton C++ 14 10-16-2004 12:23 AM
RE: strange exponentiation performance Tim Peters Python 1 11-24-2003 06:35 AM
strange exponentiation performance Jeff Davis Python 0 11-23-2003 11:31 AM



Advertisments