Re: Function terminology QUESTION

Discussion in 'C Programming' started by August Karlstrom, Oct 13, 2013.

  1. On 2013-10-13 12:39, rashan wrote:
    > Do you say there is a difference between " parameter " and " argument "
    > in as what is passed to C functions?
    >
    > Would one be for functions and another for sub/method or so? Or ByRef/
    > ByVal?


    The only difference I'm aware of is that of "formal parameters" versus
    "actual parameters". A formal parameter occurs in a function
    declaration/definition and an actual parameter occurs in a function call.

    /August
     
    August Karlstrom, Oct 13, 2013
    #1
    1. Advertising

  2. August Karlstrom <> writes:
    > On 2013-10-13 12:39, rashan wrote:
    > > Do you say there is a difference between " parameter " and " argument "
    > > in as what is passed to C functions?
    > >
    > > Would one be for functions and another for sub/method or so? Or ByRef/
    > > ByVal?

    >
    > The only difference I'm aware of is that of "formal parameters" versus
    > "actual parameters". A formal parameter occurs in a function
    > declaration/definition and an actual parameter occurs in a function call.


    There are descriptions that use the terms "formal parameter" and
    "actual parameter" as you describe, but the C standard uses the terms
    "parameter" and "argument" for those concepts. It mentions formal
    and actual parameters in passing, but it doesn't use those terms.

    The standard includes a glossary in section 3. Quoting N1570:

    3.3
    argument
    actual argument
    actual parameter (deprecated)

    expression in the comma-separated list bounded by the parentheses in
    a function call expression, or a sequence of preprocessing tokens in
    the comma-separated list bounded by the parentheses in a
    function-like macro invocation

    and

    3.16
    parameter
    formal parameter
    formal argument (deprecated)

    object declared as part of a function declaration or definition
    that acquires a value on entry to the function, or an identifier
    from the comma-separated list bounded by the parentheses
    immediately following the macro name in a function-like macro
    definition

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    Working, but not speaking, for JetHead Development, Inc.
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
     
    Keith Thompson, Oct 13, 2013
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    305
    Gary Herron
    Dec 24, 2006
  2. Paul
    Replies:
    63
    Views:
    1,302
  3. Eric Sosman

    Re: Function terminology QUESTION

    Eric Sosman, Oct 13, 2013, in forum: C Programming
    Replies:
    0
    Views:
    155
    Eric Sosman
    Oct 13, 2013
  4. James Kuyper

    Re: Function terminology QUESTION

    James Kuyper, Oct 13, 2013, in forum: C Programming
    Replies:
    0
    Views:
    166
    James Kuyper
    Oct 13, 2013
  5. Les Cargill

    Re: Function terminology QUESTION

    Les Cargill, Oct 13, 2013, in forum: C Programming
    Replies:
    17
    Views:
    279
    Ben Bacarisse
    Oct 18, 2013
Loading...

Share This Page