Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is Call use for

Status
Not open for further replies.

jamsek19

Programmer
Feb 4, 2002
35
SI
Hello everybody.
I'm start developing applications in VB. I'm studying VB as well and I got problem with CALL statement. I did't get one clear and well understanding explanation when and how is CALL statement used for. I was looking in many examples on web and I did't get reasonable case.
Can someone help me, please.
Thanks in advance.

 
The Call statement is used to tranfer program control to a subroutine or a function. However, its use is no longer necessary. Simply naming the procedure is an implicit call. I'm not sure, but I think the only reason that its still in the language is for backward compatibility.

A couple of notes tho, if you use the Call statement, then the arguement list must be enclosed in parenthesis. Without the explicit Call, then the argument list should not be in parenthesis.

If you use Call to a function, then the return value is discarded. Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Thanks a lot. Now I understand. I saw in one example where the author use CALL and also call method without a CALL statement. That was bother me.
Thanks again.
Andrej
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top