Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question about converting exponential values in DT
#5
Solved: 11 Years, 3 Months, 3 Weeks ago
Values in VBScript are accurate to 15 digits only. This should set you in the right direction (taken from http://www.windows-api.com/microsoft/VBS...stion.aspx )

Code:
Wscript.Echo AddInts(148991, 76561197960265728)

Function AddInts(lngValue1, lngValue2)
Dim V1Hi, V1Lo, V2Hi, V2Lo
Dim Temp1, Temp2, Carry, A1, A2, A3

V1Hi = Fix(lngValue1 / (10^10))
V1Lo = lngValue1 - (V1Hi * (10^10))

V2Hi = Fix(lngValue2 / (10^10))
V2Lo = lngValue2 - (V2Hi * (10^10))

Temp1 = V1Lo + V2Lo
Carry = Fix(Temp1 / (10^10))
A3 = Temp1 - (Carry * (10^10))
Temp2 = V1Hi + V2Hi + Carry
A1 = Fix(Temp2 / (10^10))
A2 = Temp2 - (A1 * (10^10))

AddInts = CStr(A1) & CStr(A2) & CStr(A3)

End Function
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply


Messages In This Thread
RE: Question about converting exponential values in DT - by Ankur - 02-17-2012, 01:18 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Overflow error while converting a Long value to an Integer Ankesh 3 4,822 10-05-2011, 11:16 AM
Last Post: Ankesh
  how to validate combobox values with testdata values 1981.madhu@gmail.com 3 5,967 09-09-2009, 06:53 PM
Last Post: Saket
  Checking if values of Listbox/Combo box on a web page the same with values in DB? robocom 4 8,385 07-08-2009, 01:52 PM
Last Post: robocom

Forum Jump:


Users browsing this thread: 1 Guest(s)