What's the difference between parameter and argument??

  • Thread starter Thread starter active_x
  • Start date Start date
A

active_x

Example:

...
test a, b, c, d
...
Sub test(ByVal a, b, c, d)
...

Are "a, b, c, d" (in test a, b, c, d) parameters or arguments?
(question 1)

Are "a, b, c, d" [in Sub test(ByVal a, b, c, d] parameters or
arguments? (question 2)

What's the difference between parameter and arguments? (question 3)
 
As far as I know, the terms parameter and argument can be and are used
interchangeably just about everywhere for the purposes of discussing
programming languages. I've noticed some bias in the literature for calling
the variables accepted by a procedure parameters, e.g.

Sub MySub(ByVal Param1 As Long, ByVal Param2 As Long)

and the values passed to those variables arguments, e.g.

Dim Arg1 As Long
Dim Arg2 As Long

Arg1 = 10
Arg2 = 20

MySub Arg1, Arg2

But this is by no means universal.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *
 

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

Back
Top