To "call" or not to "call"

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • William Morris

    To "call" or not to "call"

    So, what's the prevailing opinion regarding the use of the "CALL" keyword?
    I'm working with a third-party ASP application, adapting for our system, and
    the CALL keyword is used everywhere. I've never used it, preferring instead
    to just type the procedure name and parameters so:

    myProcedure parm1, parm2

    Any thoughts on

    call myProcedure(par m1, parm2)

    ...?


    --
    William Morris
    Product Development, Seritas LLC
    Kansas City, Missouri


  • Aaron Bertrand - MVP

    #2
    Re: To "call&quot ; or not to "call&quot ;

    It's just different syntax and allows you to use parens around your
    parameters, if you like that style. See http://www.aspfaq.com/2115

    You can see the impact on ByRef/ByVal in http://www.aspfaq.com/2488

    Neither is "better" IMHO, so I'm not sure what you're after.

    --
    Aaron Bertrand
    SQL Server MVP





    "William Morris" <news.remove.th is.and.the.dots @seamlyne.com> wrote in
    message news:2h46b8F8uk 3aU1@uni-berlin.de...[color=blue]
    > So, what's the prevailing opinion regarding the use of the "CALL" keyword?
    > I'm working with a third-party ASP application, adapting for our system,[/color]
    and[color=blue]
    > the CALL keyword is used everywhere. I've never used it, preferring[/color]
    instead[color=blue]
    > to just type the procedure name and parameters so:
    >
    > myProcedure parm1, parm2
    >
    > Any thoughts on
    >
    > call myProcedure(par m1, parm2)
    >
    > ..?
    >
    >
    > --
    > William Morris
    > Product Development, Seritas LLC
    > Kansas City, Missouri
    >
    >[/color]


    Comment

    • William Morris

      #3
      Re: To &quot;call&quot ; or not to &quot;call&quot ;

      "Aaron Bertrand - MVP" <aaron@TRASHasp faq.com> wrote in message
      news:enxFIzoPEH A.3988@tk2msftn gp13.phx.gbl...[color=blue]
      > It's just different syntax and allows you to use parens around your
      > parameters, if you like that style. See http://www.aspfaq.com/2115
      >
      > You can see the impact on ByRef/ByVal in http://www.aspfaq.com/2488
      >
      > Neither is "better" IMHO, so I'm not sure what you're after.
      >
      > --
      > Aaron Bertrand
      > SQL Server MVP
      > http://www.aspfaq.com/[/color]

      Not really "after" anything much except opinions. Thanks, Aaron.


      --
      William Morris
      Product Development, Seritas LLC
      Kansas City, Missouri


      Comment

      • Aaron Bertrand - MVP

        #4
        Re: To &quot;call&quot ; or not to &quot;call&quot ;

        > Not really "after" anything much except opinions. Thanks, Aaron.

        Well, my point was that I don't know what you mean by "better"... faster,
        more accurate, less code, more common...


        Comment

        • William Morris

          #5
          Re: To &quot;call&quot ; or not to &quot;call&quot ;

          Hey hey hey...I didn't say "better." But, if I had to pose my question more
          specifically, I guess I was asking what's more common. If there just
          happened to be something about the way the parser handles it differently,
          I'd accept that too, but it was really just a request for opinions.


          "Aaron Bertrand - MVP" <aaron@TRASHasp faq.com> wrote in message
          news:uF8d2ApPEH A.3216@TK2MSFTN GP12.phx.gbl...[color=blue][color=green]
          > > Not really "after" anything much except opinions. Thanks, Aaron.[/color]
          >
          > Well, my point was that I don't know what you mean by "better"... faster,
          > more accurate, less code, more common...
          >
          >[/color]


          Comment

          • Ray at

            #6
            Re: To &quot;call&quot ; or not to &quot;call&quot ;

            I always use Call subName. I like seeing Call, because it's much more
            obvious as to what's going on than just seeing some random work sitting
            there by itself. I also like to use parentheses.

            Call theThing(arg1, arg2)

            theThing arg1, arg2

            The former looks much better imo.

            Ray at work

            "William Morris" <news.remove.th is.and.the.dots @seamlyne.com> wrote in
            message news:2h49pcF8h4 d3U1@uni-berlin.de...[color=blue]
            > Hey hey hey...I didn't say "better." But, if I had to pose my question[/color]
            more[color=blue]
            > specifically, I guess I was asking what's more common. If there just
            > happened to be something about the way the parser handles it differently,
            > I'd accept that too, but it was really just a request for opinions.
            >
            >
            > "Aaron Bertrand - MVP" <aaron@TRASHasp faq.com> wrote in message
            > news:uF8d2ApPEH A.3216@TK2MSFTN GP12.phx.gbl...[color=green][color=darkred]
            > > > Not really "after" anything much except opinions. Thanks, Aaron.[/color]
            > >
            > > Well, my point was that I don't know what you mean by "better"...[/color][/color]
            faster,[color=blue][color=green]
            > > more accurate, less code, more common...
            > >
            > >[/color]
            >
            >[/color]


            Comment

            • Roland Hall

              #7
              Re: To &quot;call&quot ; or not to &quot;call&quot ;

              "William Morris" wrote in message news:2h46b8F8uk 3aU1@uni-berlin.de...
              : So, what's the prevailing opinion regarding the use of the "CALL" keyword?
              : I'm working with a third-party ASP application, adapting for our system,
              and
              : the CALL keyword is used everywhere. I've never used it, preferring
              instead
              : to just type the procedure name and parameters so:
              :
              : myProcedure parm1, parm2
              :
              : Any thoughts on
              :
              : call myProcedure(par m1, parm2)
              :
              : ..?

              I never use call unless I'm on my cell phone or unless I'm replying in
              response to a NG post where someone has it in their code.

              --
              Roland Hall
              /* This information is distributed in the hope that it will be useful, but
              without any warranty; without even the implied warranty of merchantability
              or fitness for a particular purpose. */
              Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
              WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
              MSDN Library - http://msdn.microsoft.com/library/default.asp


              Comment

              • Dave Anderson

                #8
                Re: To &quot;call&quot ; or not to &quot;call&quot ;

                William Morris wrote:[color=blue]
                > So, what's the prevailing opinion regarding the use of the "CALL"
                > keyword?[/color]

                I don't know about prevailing opinions, but I personally prefer it. It
                simply makes the code more readable, IMO.

                Then again, I use correct capitalization and parentheses for logic when I
                write VBScript, so I'm a bit of a kook.

                FWIW, microsoft.publi c.scripting.vbs cript might represent a better barometer
                for this.


                --
                Dave Anderson

                Unsolicited commercial email will be read at a cost of $500 per message. Use
                of this email address implies consent to these terms. Please do not contact
                me directly or ask me to contact you directly for assistance. If your
                question is worth asking, it's worth posting.


                Comment

                Working...