Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting unexpected result for sum operation
#1
Solved: 10 Years, 9 Months, 2 Weeks ago
Hi ALL,
I have been getting some unexpected result with this function which is only getting c=a+b
Code:
Function sum(a,b)
   c=a+b
   msgbox c
End Function
m=datatable.GetRowCount
For i=1 to m step 1
datatable.SetCurrentRow(i)
a=datatable.Value(1,1)
msgbox a
b=datatable.Value(2,1)
msgbox b
Call sum(a,b)
Next
when i perform this function i am geting the results like
ex: a=12 b=5
it is giving the result 125 for c , it has to give 17 (C=A+B)
if c=a-b, a*b then it is giving as expected.
Please let me know whether this is correct one or not....


Messages In This Thread
Getting unexpected result for sum operation - by venkatbatchu - 11-04-2009, 07:31 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Web Testing and Unexpected Server Errors zunebuggy 0 1,175 01-24-2018, 11:41 PM
Last Post: zunebuggy
  The DataTable.ExportSheet operation failed. Invalid file. Niraj 2 6,017 05-05-2015, 11:40 PM
Last Post: babu123
  Excel operation - to find usedrange of rows & col pooja 1 9,396 02-19-2015, 04:06 AM
Last Post: supputuri
  Capturing the exact time when an operation is performed. Dilliz 2 2,848 01-09-2014, 03:30 PM
Last Post: Dilliz
  How to capture operation such as hovering a mouse nikhilcogni 5 4,580 03-23-2013, 11:17 AM
Last Post: sams001

Forum Jump:


Users browsing this thread: 1 Guest(s)