Parameter, Argument-difference?

could someone please explain in detail the difference between a parameter and an argument.Thank you.
[114 byte] By [idomeena] at [2007-10-2 22:46:50]
# 1

A parameter is something that can assume different values. Its change affects the system. So a parameter is a term to describe an input that is used to change a system in some way.

An argument is a package of information to be used by the system. Not necessarily to cause it to change, but to be processed by it. An argument you can say, is something that is digested by the system.

For practical purposes I don't think anyone differentiates and the terms are used interchangeably. So I would hesitate to look for any difference as it may be misleading.

_dnoyeBa at 2007-7-14 6:01:13 > top of Java-index,Other Topics,Patterns & OO Design...
# 2

I agree the terms are often used interchangeably. Strictly, the difference as I've always understood it, is that what the function signature declares are parameters, and the actual values which are passed are arguments. In other words, a function has a defined set of parameters, and a function call passes corresponding arguments.

void aMethod(int p) { // p is a parameter of the function

//...

}

int a = 5;

aMethod(a); // a is an argument to a function call

Likewise, with generics, in

interface Collection<E> {} //E is a type parameter

Collection<String> = ...; //String is the type argument

To be honest I can't recall where exactly I originally got this and I don't know how generally accepted this is, but googling for "difference between parameter and argument" seems to back this up.

Message was edited by:

Loko

Lokoa at 2007-7-14 6:01:13 > top of Java-index,Other Topics,Patterns & OO Design...
# 3
> To be honest I can't ... and I don't know ...what is a paramteter? a parameter is an arbitrary constant whose value characterizes a member of a system.and that arbitrary cobstant's value is called an argument.
Lokoa at 2007-7-14 6:01:13 > top of Java-index,Other Topics,Patterns & OO Design...
# 4

> what is a paramteter? a parameter is an arbitrary

> constant whose value characterizes a member of a

> system.

>

> and that arbitrary cobstant's value is called an

> argument.

i hv a doubt - i saw this follow code sumwher

public class Person implements Comparable, Comparator {

//...

}

,daF can u pls give teh logiv, is it what is comparable, comparator, it is it arhument or paramteter?

Lokoa at 2007-7-14 6:01:13 > top of Java-index,Other Topics,Patterns & OO Design...
# 5
> ,daF can u pls give teh logiv, is it what is> comparable, comparator, it is it arhument or> paramteter?the answer lies in the english language; since your english is so baad, no wonder you cant...and dont know.
Lokoa at 2007-7-14 6:01:13 > top of Java-index,Other Topics,Patterns & OO Design...
# 6

> > To be honest I can't ... and I don't know ...

>

> what is a paramteter? a parameter is an arbitrary

> constant whose value characterizes a member of a

> system.

>

> and that arbitrary cobstant's value is called an

> argument.

Wrong.

There is a difference between the english language, which is where you got that particular definition, and terms in computer science.

I doubt you will understand the distinction though.

jschella at 2007-7-14 6:01:13 > top of Java-index,Other Topics,Patterns & OO Design...
# 7

> > > To be honest I can't ... and I don't know ...

> >

> > what is a paramteter? a parameter is an arbitrary

> > constant whose value characterizes a member of a

> > system.

> >

> > and that arbitrary cobstant's value is called an

> > argument.

>

>

> Wrong.

>

> There is a difference between the english language,

> which is where you got that particular definition,

> and terms in computer science.

>

in computer science terms, paramter means a variable, and an argument is the value assigned to the variable.

people use the terms exchangeablly because they both describe pretty much the same process: value are passed with the pass of variables.

> I doubt you will understand the distinction though.

which part of it is so difficult to understand?

jschella at 2007-7-14 6:01:13 > top of Java-index,Other Topics,Patterns & OO Design...
# 8

> in computer science terms, paramter means a variable,

> and an argument is the value assigned to the

> variable.

In your previous post, you said, and I quote: "a parameter is an arbitrary constant". Now you're saying it's a variable. What's with that?

When you said "arbitrary constant", did you perhaps mean that is the CS term for "variable"?

> people use the terms exchangeablly because they both

> describe pretty much the same process: value are

> passed with the pass of variables.

Classic! It's taken you a few posts, but you're right back at your usual level of utter irrelevancy and nonsense. Welcome back, and I have no doubt (ha!) you can even top that in this thread.

> which part of it is so difficult to understand?

The part where you so constantly and for years on end keep exposing yourself.

Lokoa at 2007-7-14 6:01:13 > top of Java-index,Other Topics,Patterns & OO Design...
# 9
> > I doubt you will understand the distinction though.> > which part of it is so difficult to understand?As you demonstrated you didn't understand what I was talking about.
jschella at 2007-7-14 6:01:13 > top of Java-index,Other Topics,Patterns & OO Design...
# 10

> > in computer science terms, paramter means a variable,

> > and an argument is the value assigned to the

> > variable.

>

> In your previous post, you said, and I quote: "a

> parameter is an arbitrary constant". Now you're

> saying it's a variable. What's with that?

a variable, in both daily english and cs terms, is a seemingly constant but actually ever changing thing, totally depending on its argument, and hence it is an arbitrary constant.

> When you said "arbitrary constant", did you perhaps

> mean that is the CS term for "variable"?

>

it is both daily english and cs term of variable.

> > people use the terms exchangeablly because they both

> > describe pretty much the same process: value are

> > passed with the pass of variables.

>

> Classic! It's taken you a few posts, but you're

> right back at your usual level of utter irrelevancy

> and nonsense. Welcome back, and I have no doubt (ha!)

> you can even top that in this thread.

>

you are back in your village now:)

> > which part of it is so difficult to understand?

>

> The part where you so constantly and for years on end

> keep exposing yourself.

dont know what you are saying in your baad english.

jschella at 2007-7-14 6:01:13 > top of Java-index,Other Topics,Patterns & OO Design...
# 11

> > > in computer science terms, paramter means a variable,

> > > and an argument is the value assigned to the

> > > variable.

> >

> > In your previous post, you said, and I quote: "a

> > parameter is an arbitrary constant". Now

> you're

> > saying it's a variable. What's with that?

>

> a variable, in both daily english and cs terms, is a

> seemingly constant but actually ever changing thing,

> totally depending on its argument, and hence it is an

> arbitrary constant.

>

Wrong.

It is amazing that you can pack so many incorrect things into a single sentence like that.

jschella at 2007-7-14 6:01:13 > top of Java-index,Other Topics,Patterns & OO Design...
# 12

> > > in computer science terms, paramter means a

> variable,

> > > and an argument is the value assigned to the

> > > variable.

> >

> > In your previous post, you said, and I quote:

> "a

> > parameter is an arbitrary constant". Now

> you're

> > saying it's a variable. What's with that?

>

> a variable, in both daily english and cs terms, is a

> seemingly constant but actually ever changing thing,

> totally depending on its argument, and hence it is an

> arbitrary constant.

I see. So would you say that a variable is a constant - at least seemingly - because it has a determined value, up to the point where that value is changed, after which point it - the variable - is again a constant - seemingly!- but the values may have an undetermined range and that is why a variable is an arbitrary constant?

Lokoa at 2007-7-14 6:01:13 > top of Java-index,Other Topics,Patterns & OO Design...
# 13

> It is amazing that you can pack so many incorrect

> things into a single sentence like that.

It's also amazing how easy it is to drag more BS out of him by just getting him to elaborate or putting two of his quotes together. I reckon one could get him to say pretty much anything - as long as it's doesn't make sense of course.

Lokoa at 2007-7-14 6:01:13 > top of Java-index,Other Topics,Patterns & OO Design...
# 14

> It's also amazing how easy it is to drag more BS out

> of him by just getting him to elaborate or putting

> two of his quotes together. I reckon one could get

> him to say pretty much anything - as long as it's

> doesn't make sense of course.

conceptually making sense, you are an conceptual chicken, with some interfaces attached to you, like cloneable and delusional:)

what a conceptual day! but it is a true friday not a conceptual one:)

Lokoa at 2007-7-14 6:01:13 > top of Java-index,Other Topics,Patterns & OO Design...
# 15
I use the nouns parameter and argument as synonyms. What mattersis the 'formal' argument/parameter and 'actual' argument/parameter.kind regards,Jos
JosAHa at 2007-7-21 8:36:30 > top of Java-index,Other Topics,Patterns & OO Design...
# 16

> I use the nouns parameter and argument as synonyms.

> What matters

> is the 'formal' argument/parameter and 'actual'

> argument/parameter.

>

> kind regards,

>

> Jos

I think they can be used interchangeably, no problem, but my impression is that theres kind of a consensus in "CS community" (I dont wanna write like daFei, please!!!) that when you invoke a method you are passing arguments, and the method itself has parameters on its signature definition. But it is just my assumption. For example:

//when you invoke the doSomething() method

//you are passing an argument

//whose value is 2

doSomething(2);

//this method below has an int parameter

//and not an int argument

void doSomething(int param) {

//...

}

I mean, generally you dont say "pass the parameter 2 to doSomething method". You say "pass the argument 2 to doSomething method". At least this is the way I use these two terms. Probably there is not an "official" definition in CS for these both terms yet. Dont know exactly if there is or not. I think these two terms are simply used by programmers, and nobody cares to make a "definitive definition" for them. And IMO it does not need to.

But I dont think this is a subject for a long discussion. It would just be a waste of time.

TheLoosera at 2007-7-21 8:36:30 > top of Java-index,Other Topics,Patterns & OO Design...
# 17

> I see. So would you say that a variable is a constant

> - at least seemingly - because it has a determined

> value, up to the point where that value is changed,

> after which point it - the variable - is again a

> constant - seemingly!- but the values may have an

> undetermined range and that is why a variable is an

> arbitrary constant?

All variables are constant except while they are changing.

jverda at 2007-7-21 8:36:30 > top of Java-index,Other Topics,Patterns & OO Design...
# 18

> > I use the nouns parameter and argument as

> synonyms.

> > What matters

> > is the 'formal' argument/parameter and 'actual'

> > argument/parameter.

> >

> > kind regards,

> >

> > Jos

>

> I think they can be used interchangeably, no problem,

> but my impression is that theres kind of a consensus

> in "CS community" (I dont wanna write like daFei,

> please!!!) that when you invoke a method you are

> passing arguments, and the method itself has

> parameters on its signature definition. But it is

> just my assumption.

The signature vs. invocation-time value / formal vs. actual distinction gels with my hazy memory of when I heard parameter and argument defined back in college. I think the distinction only matters for compiler writers and peole debating the fine points of a language or runtime spec.

jverda at 2007-7-21 8:36:30 > top of Java-index,Other Topics,Patterns & OO Design...
# 19

> > I see. So would you say that a variable is a

> constant

> > - at least seemingly - because it has a determined

> > value, up to the point where that value is

> changed,

> > after which point it - the variable - is again a

> > constant - seemingly!- but the values may have an

> > undetermined range and that is why a variable is

> an

> > arbitrary constant?

>

> All variables are constant except while they are

> changing.

I like to consider the two terms, variable and constant, as completely anthonyms. I mean: a constant cannot vary, because if it happens, that constant is not constant. Am I being clear? LOL!!!

I mean, in "CS community" (again, like daFei!! No!!!) a constant that varies doesnt make sense. A constants value must keep constant, otherwise it would not be considered constant. At least this is my way of thinking.

TheLoosera at 2007-7-21 8:36:30 > top of Java-index,Other Topics,Patterns & OO Design...
# 20

I looked through several books and only found one formal definition in the "The C Programming Language".

From section 1.7....

We will generally use parameter for a variable named in the parenthesized list in a function definition, and argument for the value used in a call of the function.

jschella at 2007-7-21 8:36:30 > top of Java-index,Other Topics,Patterns & OO Design...
# 21

> I looked through several books and only found one

> formal definition in the "The C Programming

> Language".

>

> From section 1.7....

>

>

> We will generally use parameter for a variable named

> in the parenthesized list in a function definition,

> and argument for the value used in a call of the

> function.

>

really you dont have to go through all that to get what i told you already; however, there is an exception to that: optentimes the default sample signature of main in java uses "args" instead of "params", which indicates really it is more of a matter of "habits":

public static void main(String[] args){}

jschella at 2007-7-21 8:36:30 > top of Java-index,Other Topics,Patterns & OO Design...
# 22

> really you dont have to go through all that to get

> what i told you already; however, there is an

> exception to that: optentimes the default sample

> signature of main in java uses "args" instead of

> "params", which indicates really it is more of a

> matter of "habits":

Your complete lack of ability to determine what is pertient and relevant in a disussion never ceases to amaze me.

dubwaia at 2007-7-21 8:36:30 > top of Java-index,Other Topics,Patterns & OO Design...
# 23

> > really you dont have to go through all that to get

> > what i told you already; however, there is an

> > exception to that: optentimes the default sample

> > signature of main in java uses "args" instead of

> > "params", which indicates really it is more of a

> > matter of "habits":

>

> Your complete lack of ability to determine what is

> pertient and relevant in a disussion never ceases to

> amaze me.

urh? pertient? of course, very pertient indeed, and never ceases to shock the world. hehe:)

any ways, look back just a few posts, i said explicitly the following:

in computer science terms, paramter means a variable, and an argument is the value assigned to the variable.

dubwaia at 2007-7-21 8:36:30 > top of Java-index,Other Topics,Patterns & OO Design...
# 24
> Your complete lack of ability to determine what is> pertient and relevant in a disussion never ceases to> amaze me.i can barely know what is relevant, as for what is pertient, frankly i have no idea.
dubwaia at 2007-7-21 8:36:30 > top of Java-index,Other Topics,Patterns & OO Design...
# 25

> I looked through several books and only found one

> formal definition in the "The C Programming

> Language".

>

> From section 1.7....

>

>

> We will generally use parameter for a variable named

> in the parenthesized list in a function definition,

> and argument for the value used in a call of the

> function.

>

another exception is an actual parameter is not one of the parenthesized list in a function.

dubwaia at 2007-7-21 8:36:30 > top of Java-index,Other Topics,Patterns & OO Design...
# 26

> really you dont have to go through all that to get

> what i told you already;

You didn't "tell" anything. You just repeated what I already said in reply #2 and added a wrong interpretation. Then you added another wrong interpretation which contradicts the first (after apparently reading about arbitrary constants somewhere - and completely missing that point as well). Then, in a futile attempt to keep your nonsense consistent, you made even more of a fool out of yourself.

Lokoa at 2007-7-21 8:36:30 > top of Java-index,Other Topics,Patterns & OO Design...
# 27

> i can barely know what is relevant, as for what is

> pertient, frankly i have no idea.

Are you, the projector of illiteracy, mocking someone else's typo, in a thread where you managed to spell one of the key topic words incorrectly more often than correctly? You're pathetic.

Lokoa at 2007-7-21 8:36:30 > top of Java-index,Other Topics,Patterns & OO Design...
# 28

> You didn't "tell" anything. You just repeated what I

> already said in reply #2

coll, man, you said it first, you are very pertiant:)

actually prams and args are the same thing, in both daily english and in computer science, it is basically a "habit", no substance.

1) actual/formal parameters, not arguments.

2) pass arguments or parameters

3) param list, not argument list; however people do use argv or argc in c/c++ and args in java main methods, have never seen anyone uses paramc or paramv or params.

so loko, you pertiant and you became pertian, meaning wrong, totally.

Lokoa at 2007-7-21 8:36:30 > top of Java-index,Other Topics,Patterns & OO Design...
# 29
That's incorrect.
Lokoa at 2007-7-21 8:36:30 > top of Java-index,Other Topics,Patterns & OO Design...
# 30
I see daFei has found a new area in which to be utterly clueless and to babble a bunch of self-contradictory nonsense. Whee.
jverda at 2007-7-21 8:36:34 > top of Java-index,Other Topics,Patterns & OO Design...
# 31

Jup... I don't know why precisely it's so addictive to keep poking at him; but I just can't resist :-). I know there's no need, he's pretty much self-mocking especially when it concerns his "native" English skills. I guess I keep waiting for some truly hilarious things to come out but lately it's been rather bland.

Lokoa at 2007-7-21 8:36:34 > top of Java-index,Other Topics,Patterns & OO Design...
# 32

> I see daFei has found a new area in which to be

> utterly clueless and to babble a bunch of

> self-contradictory nonsense. Whee.

it is really not about being pertiant, rather it is a process of figuring what is right. at this moment, after giving a few more thoughts, i would think parameters are meant to be variables as in the param list, eg, formal and actual params.

although the actual param is not in the param list, it has something to with it initilizing the formal param. exactly where does the initilizing happen? on the local stacks? or outside?

as for the argsc, argv or args in the main method, i think this is where actual values are passed onto the program, not variables, hence it is called args, not params.

does it not make sense to you?

Lokoa at 2007-7-21 8:36:34 > top of Java-index,Other Topics,Patterns & OO Design...
# 33
Daf, nothing you say makes any sense. Your poor English skills and your lack of understsanding of anything CS are in a close battle to see which one can do a better job of rendering your posts useless.
jverda at 2007-7-21 8:36:34 > top of Java-index,Other Topics,Patterns & OO Design...
# 34
> to see which one> can do a better job of rendering your posts useless.so far there is no luck...
jverda at 2007-7-21 8:36:34 > top of Java-index,Other Topics,Patterns & OO Design...
# 35

There is no luck involved or needed. Both your illiteracy and ineptitude in CS are so complete that the chances of you accidentally posting something correct are actually zero. And you can take that zero as a parameter or an argument or an imagined object, it's still zero.

Because I do pity you and you make me laugh, I'll help you with just one of the many shortcomings you've displayed here: neither "pertian" nor "pertiant" is a real English word AFAIK. HTH, and you're welcome.

Lokoa at 2007-7-21 8:36:34 > top of Java-index,Other Topics,Patterns & OO Design...
# 36
> And you can take that zero> as a parameter or an argument or an imagined object,> it's still zero.>IMNSHV, zero can only be an argument, not a paramater, as you can not declare zero as a variable.
Lokoa at 2007-7-21 8:36:34 > top of Java-index,Other Topics,Patterns & OO Design...
# 37
> IMNSHV, zero can only be an argument, not a> paramater, as you can not declare zero as a variable.What does the "CS Community" think about what you think, daFei?
TheLoosera at 2007-7-21 8:36:34 > top of Java-index,Other Topics,Patterns & OO Design...
# 38
> IMNSHV, zero can only be an argument, not a> > paramater, as you can not declare zero as a variable.> > What does the "CS Community" think about what you> think, daFei?and you claim you know?
TheLoosera at 2007-7-21 8:36:34 > top of Java-index,Other Topics,Patterns & OO Design...