parameter vs argument

Discussion in 'Java' started by Roedy Green, Oct 25, 2007.

  1. Roedy Green

    Roedy Green Guest

    Has anyone run across an official definition of argument and parameter
    for Java?
    --
    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
    Roedy Green, Oct 25, 2007
    #1
    1. Advertising

  2. Roedy Green

    Daniel Dyer Guest

    On Thu, 25 Oct 2007 16:38:31 +0100, Roedy Green
    <> wrote:

    > Has anyone run across an official definition of argument and parameter
    > for Java?


    Not specifically for Java, but the only interpretation I've seen that
    doesn't use the terms interchangeably is that an argument is a specific
    instance of a parameter.

    E.g, in the following example, the parameter for doSomething is anInteger
    and the argument is 4.

    public static void doSomething(int anInteger)
    {
    System.out.println("The argument was " + anInteger);
    }

    public static void main(String[] s)
    {
    doSomething(4);
    }

    Dan.

    --
    Daniel Dyer
    http://www.uncommons.org
    Daniel Dyer, Oct 25, 2007
    #2
    1. Advertising

  3. Roedy Green

    Eric Sosman Guest

    Roedy Green wrote On 10/25/07 11:38,:
    > Has anyone run across an official definition of argument and parameter
    > for Java?


    JLS 8.4.1 defines "formal parameter" and refers to
    "actual argument expressions" that supply the initial
    values of the "parameter variables." This is consistent
    with the practice in some other languages: The parameter
    is the local variable in the method/function/subroutine/
    procedure/lambda expression/whatever, and the argument
    is the caller-supplied value/reference/thingy.

    --
    Eric Sosman, Oct 25, 2007
    #3
  4. Roedy Green

    Roedy Green Guest

    On Thu, 25 Oct 2007 12:29:06 -0400, Eric Sosman <>
    wrote, quoted or indirectly quoted someone who said :

    > JLS 8.4.1 defines "formal parameter" and refers to
    >"actual argument expressions" that supply the initial
    >values of the "parameter variables." This is consistent
    >with the practice in some other languages: The parameter
    >is the local variable in the method/function/subroutine/
    >procedure/lambda expression/whatever, and the argument
    >is the caller-supplied value/reference/thingy.


    thanks. I have written new entries for
    http://mindprod.com/jgloss/parameters.html
    http://mindprod.com/jgloss/arguments.html
    --
    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
    Roedy Green, Oct 25, 2007
    #4
  5. Roedy Green

    Wayne Guest

    Roedy Green wrote:
    > On Thu, 25 Oct 2007 12:29:06 -0400, Eric Sosman <>
    > wrote, quoted or indirectly quoted someone who said :
    >
    >> JLS 8.4.1 defines "formal parameter" and refers to
    >> "actual argument expressions" that supply the initial
    >> values of the "parameter variables." This is consistent
    >> with the practice in some other languages: The parameter
    >> is the local variable in the method/function/subroutine/
    >> procedure/lambda expression/whatever, and the argument
    >> is the caller-supplied value/reference/thingy.

    >
    > thanks. I have written new entries for
    > http://mindprod.com/jgloss/parameters.html
    > http://mindprod.com/jgloss/arguments.html


    The terms are interchangeable. But I'm sure we could
    have a long parameter on this subject.

    -Wayne
    Wayne, Oct 25, 2007
    #5
  6. Andrew Thompson, Oct 26, 2007
    #6
  7. Roedy Green

    Mark Space Guest

    Andrew Thompson wrote:
    > Wayne wrote:
    > ..
    >> The terms are interchangeable. But I'm sure we could
    >> have a long parameter on this subject.

    >
    > (chuckle)
    >


    Yeah that was a good one. I was going to say that Java methods have
    parameters and arguments are what we have here. ;-)
    Mark Space, Oct 26, 2007
    #7
  8. Roedy Green

    Lew Guest

    Mark Space wrote:
    > Yeah that was a good one. I was going to say that Java methods have
    > parameters and arguments are what we have here. ;-)


    Must ... not ... quote ... Monty Python ... ... must ... resist . . . .

    --
    Lew
    Lew, Oct 26, 2007
    #8
  9. Lew <> wrote:
    > Mark Space wrote:
    >> Yeah that was a good one. I was going to say that Java methods have
    >> parameters and arguments are what we have here. ;-)

    > Must ... not ... quote ... Monty Python ... ... must ... resist . . . .

    no!
    Andreas Leitgeb, Oct 26, 2007
    #9
  10. Lew wrote:
    >> Yeah that was a good one. I was going to say that Java methods have
    >> parameters and arguments are what we have here. ;-)

    >
    >Must ... not ... quote ... Monty Python ... ... must ... resist . . . .


    I hate to admit this, but I am not entirely sure of the
    Monty Python quote you are referring to, and I'm burning
    with curiosity.

    The only sketch I can think of that comes close, is the
    'I want an argument' sketch.

    <poorly paraphrased MP>
    "Oh, I'm sorry, ..you wanted an argument? This is 'abuse'."
    </poorly paraphrased MP>

    --
    Andrew Thompson
    http://www.athompson.info/andrew/

    Message posted via http://www.javakb.com
    Andrew Thompson, Oct 26, 2007
    #10
  11. Roedy Green

    Lew Guest

    Andrew Thompson wrote:
    > The only sketch I can think of that comes close, is the
    > 'I want an argument' sketch.


    You get the gold star. That is the one that fits the parameters.

    --
    Lew
    Lew, Oct 26, 2007
    #11
  12. Roedy Green

    Roedy Green Guest

    On Fri, 26 Oct 2007 09:15:04 -0400, Lew <> wrote,
    quoted or indirectly quoted someone who said :

    >You get the gold star. That is the one that fits the parameters.


    Who can quote the line from Star Trek?
    --
    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
    Roedy Green, Oct 26, 2007
    #12
  13. Lew wrote:
    >> The only sketch I can think of that comes close, is the
    >> 'I want an argument' sketch.

    >
    >You get the gold star.


    Thanks! That is much more validation than any ..
    <dws>Google groups 'rating'</dws>.

    But I am surprised that ..an *American* * would have
    such arcane knowledge of Monty Python! It is good
    to post to these international newsgroups, if only to
    dispell such 'colloquial myths'!

    * My apologies for my amazement, but I thought Monty
    Python's appeal was limited to those English speaking
    countries that were 'not America'. I had suspected the
    MP humor to be 'beyond them' ( thank you for pointing
    out the - ..naivety of my ways ;).

    --
    Andrew Thompson
    http://www.athompson.info/andrew/

    Message posted via JavaKB.com
    http://www.javakb.com/Uwe/Forums.aspx/java-general/200710/1
    Andrew Thompson, Oct 26, 2007
    #13
  14. Roedy Green wrote:
    >>You get the gold star. That is the one that fits the parameters.

    >
    >Who can quote the line from Star Trek?


    Who cares? (I always hated Star Trek, such dweebie
    "let's all get in touch with our inner feelings" crap that I
    hoped the Klingons/Borg/'WhoCares?' would wipe the lot
    of them out - they did not deserve to infest the universe
    with 'Federation Dweebies').

    --
    Andrew Thompson
    http://www.athompson.info/andrew/

    Message posted via http://www.javakb.com
    Andrew Thompson, Oct 26, 2007
    #14
  15. Roedy Green <> writes:

    > On Fri, 26 Oct 2007 09:15:04 -0400, Lew <> wrote,
    > quoted or indirectly quoted someone who said :
    >
    >>You get the gold star. That is the one that fits the parameters.

    >
    > Who can quote the line from Star Trek?


    Beyond "Beam me up, Scotty", "Make it so", "Open hailing frequencies"
    and "Fire photon torpedos"? :)

    /L '*sing* We come in peace, shoot to kill, shoot to kill! *sing*'
    --
    Lasse Reichstein Nielsen -
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
    'Faith without judgement merely degrades the spirit divine.'
    Lasse Reichstein Nielsen, Oct 26, 2007
    #15
  16. Roedy Green

    Daniel Pitts Guest

    Andrew Thompson wrote:
    > Lew wrote:
    >>> The only sketch I can think of that comes close, is the
    >>> 'I want an argument' sketch.

    >> You get the gold star.

    >
    > Thanks! That is much more validation than any ..
    > <dws>Google groups 'rating'</dws>.
    >
    > But I am surprised that ..an *American* * would have
    > such arcane knowledge of Monty Python! It is good
    > to post to these international newsgroups, if only to
    > dispell such 'colloquial myths'!
    >
    > * My apologies for my amazement, but I thought Monty
    > Python's appeal was limited to those English speaking
    > countries that were 'not America'. I had suspected the
    > MP humor to be 'beyond them' ( thank you for pointing
    > out the - ..naivety of my ways ;).
    >

    Monty Python is quite popular here actually. Although it does kind of
    have a niche following. Some might even say that social misfits enjoy
    MP more than the rest. Personally, that either makes them wrong or me a
    social misfit (or both, possibly).



    --
    Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
    Daniel Pitts, Oct 26, 2007
    #16
  17. Roedy Green

    Daniel Pitts Guest

    Andrew Thompson wrote:
    > Roedy Green wrote:
    >>> You get the gold star. That is the one that fits the parameters.

    >> Who can quote the line from Star Trek?

    >
    > Who cares? (I always hated Star Trek, such dweebie
    > "let's all get in touch with our inner feelings" crap that I
    > hoped the Klingons/Borg/'WhoCares?' would wipe the lot
    > of them out - they did not deserve to infest the universe
    > with 'Federation Dweebies').
    >

    You must be thinking of Star Trek: TNG. The original star trek was all
    about beating up aliens and wooing the girl.


    --
    Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
    Daniel Pitts, Oct 26, 2007
    #17
  18. Andrew Thompson wrote:
    > Lew wrote:
    >>> The only sketch I can think of that comes close, is the
    >>> 'I want an argument' sketch.

    >> You get the gold star.

    >
    > Thanks! That is much more validation than any ..
    > <dws>Google groups 'rating'</dws>.
    >
    > But I am surprised that ..an *American* * would have
    > such arcane knowledge of Monty Python! It is good
    > to post to these international newsgroups, if only to
    > dispell such 'colloquial myths'!
    >
    > * My apologies for my amazement, but I thought Monty
    > Python's appeal was limited to those English speaking
    > countries that were 'not America'. I had suspected the
    > MP humor to be 'beyond them' ( thank you for pointing
    > out the - ..naivety of my ways ;).


    > feed bird

    It's not hungry (It's merely pinin' for the Fjords). Besides You
    have no bird seed.
    -- Crowther and Woods: "Adventure", alias "Colossal Cave"


    > read label

    !!!! FROBOZZ MAGIC BOAT COMPANY !!!!

    Hello, Sailor!

    Instructions for use:

    To get into boat, say 'Board'
    To leave boat, say 'Disembark'

    To get into a body of water, say 'Launch'
    To get to shore, say 'Land'

    Warranty:

    This boat is guaranteed against all defects in parts and
    workmanship for a period of 76 milliseconds from date of purchase or
    until first used, whichever comes first.

    Warning:
    This boat is made of plastic. Good Luck!
    -- MIT "Zork"


    > read book

    Oh ye who go about saying unto each: "Hello sailor":
    dost thou know the magnitude of thy sin before the gods?
    Yea, verily, thou shalt be ground between two stones.
    Shall the angry gods cast thy body into the whirlpool?
    Surely, thy eye shall be put out with a sharp stick!
    Even unto the ends of the earth shalt thou wander and
    unto the land of the dead shalt thou be sent at last.
    Surely thou shalt repent of thy cunning.
    -- MIT "Zork"



    --
    John W. Kennedy
    "But now is a new thing which is very old--
    that the rich make themselves richer and not poorer,
    which is the true Gospel, for the poor's sake."
    -- Charles Williams. "Judgement at Chelmsford"
    John W. Kennedy, Oct 26, 2007
    #18
  19. Roedy Green

    Travis James Guest

    Andrew Thompson wrote:
    > * My apologies for my amazement, but I thought Monty
    > Python's appeal was limited to those English speaking
    > countries that were 'not America'. I had suspected the
    > MP humor to be 'beyond them' ( thank you for pointing
    > out the - ..naivety of my ways ;).
    >

    I had never thought about how a Brit might think Americans take Monty
    Python. It's not at all uncommon at a gathering/cocktail party for a
    group of men (never women that I've seen) take some topic and twist it
    into some MP skit or movie scene.

    MP fans I know seem to cut their teeth on Holy Grail or Meaning of Life
    before fully appreciating Life of Brian or episodes of MP's Flying
    Circus. (Never saw Jabberwocky.)

    -- TJ (Californian)
    Travis James, Oct 26, 2007
    #19
  20. Roedy Green

    Lew Guest

    Travis James wrote:
    > Andrew Thompson wrote:
    >> * My apologies for my amazement, but I thought Monty
    >> Python's appeal was limited to those English speaking
    >> countries that were 'not America'. I had suspected the MP humor to be
    >> 'beyond them' ( thank you for pointing out the - ..naivety of my ways ;).
    >>

    > I had never thought about how a Brit might think Americans take Monty
    > Python. It's not at all uncommon at a gathering/cocktail party for a
    > group of men (never women that I've seen) take some topic and twist it
    > into some MP skit or movie scene.
    >
    > MP fans I know seem to cut their teeth on Holy Grail or Meaning of Life
    > before fully appreciating Life of Brian or episodes of MP's Flying
    > Circus. (Never saw Jabberwocky.)


    I remember how impressed I was that /Matching Tie and Handkerchief/ was a
    3-sided LP pressed onto a single disc of vinyl.

    --
    Lew
    Lew, Oct 26, 2007
    #20
    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. Bhushit Joshipura

    defaulting argument to previous argument

    Bhushit Joshipura, Dec 29, 2003, in forum: C++
    Replies:
    5
    Views:
    399
  2. Ben Kial
    Replies:
    1
    Views:
    623
    Eric Enright
    Nov 15, 2004
  3. S?ren Gammelmark
    Replies:
    1
    Views:
    1,866
    Eric Sosman
    Jan 7, 2005
  4. nw
    Replies:
    0
    Views:
    297
  5. AikidoGuy
    Replies:
    11
    Views:
    540
    Seebs
    Nov 21, 2011
Loading...

Share This Page