Re: working with very LARGE NUMERIC values in VBS

Tech-Archive recommends: Fix windows errors by optimizing your registry



"Crash" Dummy wrote:
I was doing some testing with comparing numeric values and selecting
the largest value..

<snip>

You have to treat the numbers as strings instead of integers. The
logic for the script below is that a number with more digits than
another is a larger number, and if they have that same number of
digits, regular string comparison will give the same result as
numeric comparison. The numbers are converted to text strings using
the "CStr()" function.
<snip>

I presume you left the handling of negative numbers as an "exercise for the
student" ... ;-)
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


.



Relevant Pages