answersLogoWhite

0


Best Answer

In programming languages, a parameter and an argument are the same thing; there is no actual difference between the two. Although a few languages do differentiate between an actual argument and a formal argument by calling one a parameter and the other an argument (or vice versa), the terms are universally interchangeable. That is; there is no single definition that applies to any one language, including Visual Basic.

The language may have a convention, but there's no reason to follow that convention. Personally, I prefer the term argument and use the terms formal argument and actual argument whenever I need to specifically differentiate one from the other. In this way I can refer to them in a consistent but language-agnostic manner. Only a Pedant would argue that the terms parameter and argument have a specific meaning to a specific language, even when the creators of that language use the terms interchangeably themselves.

To clarify, an actual argument is the argument being passed to a function while a formal argument is the argument that is used by the function. The two will always have the same value, but they are not the same argument.

For instance, consider the following function definition:

f (int a) { print a*2 }

Whether we regard 'a' as being a parameter or an argument is immaterial -- it is a formal argument or formal parameter, whichever you prefer. The meaning is clarified by using the word "formal".

Now consider the calling code:

b = 42

f (b)

Here, b is the actual argument (or actual parameter) being passed to the function f. Note that a and b are not the same variable or reference. That alone means there is no reason to differentiate them; the meaning of argument or parameter is implied by the context alone.

It doesn't matter whether the function uses pass by value or pass by reference semantics. When passing arguments by value, a is simply a copy of b (independent variables with the same value). When passing by reference, a refers to the same memory address as b (a is an alias for b). In either case, the function uses the formal argument named a while the calling code uses the actual argument named b. In other words, the names are only accessible from within the scope in which they are declared, even if they refer to the same memory address.

Of course, a function may pass one of its formal arguments to another function. Thus with respect to the calling function, its formal argument becomes an actual argument to the function being called.

User Avatar

Wiki User

9y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between parameters and arguments in VB?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between Csharp and vb?

C# its Very Sharp VB-Visual Basic Extension for BASIC C# its Very Sharp VB-Visual Basic Extension for BASIC


What is a difference between dotnet and VB?

Nothing, as VB is now part of .Net. .Net contains following main languages: - C# - VB However, VB 6 was before .Net and was independent. dotnet is a framework that supports multiple languages and vb is one the language supported by dotnet.


Is potential difference can be positive negative or zero?

That is correct. Since potential difference is a difference, Vb - Va ,then you can have all three possibilities. The potential at a point, say Va, is itself a difference. It is the potential difference between point "a" and a second point "0" where the potential is choosen to be zero. This zero point is completely arbitrary , provided it does not lead to mathematical difficulties. Sometimes it is convienient to choose a zero location for potential and sometimes its not necessary. For example; suppose the potential difference between charged parallel plates a & b is Vb - Va = 10 volts. This would require that Vb > Va , but the actual values of Vb & Va need not be known. Then Va - Vb = - 10 volts. If one wants to choose point "a" as the zero point, then Vb = 10 v. Or if one wants to choose Vb as the zero point then Va = - 10 v. Or if one wants to choose midway between the plates as the zero point then Vb = 5v & Va = - 5v.


What is difference between vb script and java script?

JavaScript is just like VB Script, but VB Script is what windows made to try to get rid of JavaScript, but as you can see im sure JavaSript is the winner. They are the same thing pretty much just a little alterations in the code.


What is the difference between VB-Script and JavaScript?

vbscript is used for server side as well as client side where as java script is used for client side only.


Difference between SDI and MDI form in VB?

SDI consists of only one form whereas MDI can ontain more than one form


How do you deploy a VB DLL in java?

use VC++ as a bridge between VB and Java. there seems to be no easier way than that. good luck. use VC++ as a bridge between VB and Java. there seems to be no easier way than that. good luck.


Can you make vb in vb?

Yes it is possible, most things are in VB


What the abbreviation of verb?

vb or vb


What is the abbreviation of verb?

vb or vb


How you make VB?

you dont make vb vb is visual basics and you make stuff in it


What are viva questions in vb?

viva question for vb