The Call statement


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: The Call statement

  1. #1
    Join Date
    Apr 2007
    Posts
    18

    The Call statement

    I just have this doubt over using the call statement in vb:

    What is the use of using the "Call" to call a function?
    Even if we skip this call and simply put the functions name in a sub its going to be called, isn't it?


    so what's the benefit of using the call? is it just for the purpose of the Readability of the code that we are using this this "Call"?

    Pls explain??????????

  2. #2
    Join Date
    Mar 2005
    Location
    Los Angeles, Calif. AKA: Gangsta Yoda™
    Posts
    455
    Yes, read-ability. There are a few syntaxes for using it.

    Call SomeSub

    or

    SomeSub

    or if calling a function to pass a value...

    Call SomeFunction("Blah")

    or

    SomeFunction "Blah"

    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer code questions via PMs.
    Microsoft MVP 2006-2009
    Office Development FAQ (VBA, VB6, VB.NET, C#)
    Software Engineer MCP (VB6 & .NET)
    Reps & Rating PostsVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6Outlook Global Address List

  3. #3
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    FYI, for consistency and readability, in VB.NET Call is no longer optional.
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Similar Threads

  1. Learning Help
    By Carlos in forum Java
    Replies: 3
    Last Post: 07-31-2005, 06:17 PM
  2. Re: select statement question again
    By MANGO in forum Database
    Replies: 0
    Last Post: 03-06-2001, 10:41 PM
  3. How to get call time in Com+ Catalog
    By ktlau in forum Enterprise
    Replies: 0
    Last Post: 01-23-2001, 11:38 PM
  4. NetUserEnum Api
    By Mike in forum VB Classic
    Replies: 0
    Last Post: 04-24-2000, 04:05 PM
  5. Replies: 1
    Last Post: 04-21-2000, 12:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center