parameter vs argument

R

Roedy Green

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

Daniel Dyer

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.
 
E

Eric Sosman

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.
 
R

Roedy Green

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
 
M

Mark Space

Andrew said:
Wayne wrote:
..

(chuckle)

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

Lew

Mark said:
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 . . . .
 
A

Andrew Thompson

Lew said:
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>
 
L

Lew

Andrew said:
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.
 
A

Andrew Thompson

Lew said:
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
 
A

Andrew Thompson

Roedy said:
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').
 
L

Lasse Reichstein Nielsen

Roedy Green said:
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*'
 
D

Daniel Pitts

Andrew said:
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).
 
D

Daniel Pitts

Andrew said:
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.
 
J

John W. Kennedy

Andrew said:
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"
 
T

Travis James

Andrew said:
* 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)
 
L

Lew

Travis said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top