Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Query regarding "Call" statement
#1
Not Solved
The following piece of code gives an output value 10 :

Code:
Function FinalVal( ByRef var )
    var = var + 1
End Function

Dim x: x = 10
FinalVal(x)
MsgBox x
'--------------------------

But the following code gives an output value 11 :

Code:
Function FinalVal( ByRef var )
    var = var + 1
End Function

Dim x: x = 10
call FinalVal(x)

MsgBox x
'----------------------------

Its clear that the use of the "Call" statement is the reason behind the difference in the output.
But why does that happen?
Reply
#2
Not Solved
what is the scenario you are working so that i can suggest you another way
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Data Table Query Suma Parimal 4 4,770 01-21-2014, 12:50 PM
Last Post: Suma Parimal
  UFT Query invisible786 0 1,896 01-15-2014, 09:41 PM
Last Post: invisible786
  Query about checkpoints pkdhake 5 3,701 07-11-2013, 03:17 PM
Last Post: vinod123
  Run a finall Call statement after all iterations mv8167 2 2,565 05-24-2012, 08:12 PM
Last Post: mv8167
  query on test results look in qtp 11 madhulika99 1 2,728 02-25-2012, 07:28 AM
Last Post: inborntester

Forum Jump:


Users browsing this thread: 2 Guest(s)