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


Messages In This Thread
Query regarding "Call" statement - by anupam4j - 09-26-2014, 12:28 PM

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

Forum Jump:


Users browsing this thread: 2 Guest(s)