answersLogoWhite

0


Best Answer

A function (also known as procedure, subroutine, and - in object-oriented languages - as a method) lets you do repetitive calculations in a single place, without having to repeat lots of commands over and over. For example, you might have a function that calculates the square root of a number.

An argument (also known as a parameter) is any variable information you pass to your function. For example, in the case of calculating a square root, the argument tells the function what number you want to calculate the square root of. For calculating powers, you might have two arguments: the base, and the exponent. In general, a function can have zero or more arguments - it really depends what it is used for.

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is implied by the argument of the function?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

When a function is used as an argument in another function?

It is called callback function. For an example see the qsort function.


What happen when a c program passes an array as a function argument?

When an array name is passed as a function argument, the address of the first element is passed to the function. In a way, this is implicit call by reference. The receiving function can treat that address as a pointer, or as an array name, and it can manipulate the actual calling argument if desired.


What is the name given to the technique whereby a function argument can be modified by passing a pointer to the argument?

Call_by_reference


What is the difference between parameters and arguments in VB?

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.


What does sqrt function return?

square root of the argument

Related questions

What is implict?

Something which is implied. "It is implicit in your argument that war is justified".


When a function is used as an argument in another function?

It is called callback function. For an example see the qsort function.


What are limits in maths?

Limits (or limiting values) are values that a function may approach (but not actually reach) as the argument of the function approaches some given value. The function is usually not defined for that particular value of the argument.


What powers gives congress more creative avenues for expanding their powers?

Implied powers are what allow Congress to creatively expand its reach and power. Alexander Hamilton used the argument of implied powers to justify the creation of a national bank.


How are expressed powers and implied powers related?

Express powers are stated explicitly in the instrument confering the power. Implied powers are 'implied' from the function. So if a Minister has the power to make a decision it might be implied that he or she can hold an inquiry first.


Does the phrase cherry on top typically function as an implied metaphor?

yes


What happen when a c program passes an array as a function argument?

When an array name is passed as a function argument, the address of the first element is passed to the function. In a way, this is implicit call by reference. The receiving function can treat that address as a pointer, or as an array name, and it can manipulate the actual calling argument if desired.


What is a value that is substituted for the independent variable in a relationship or function?

It is called the argument of the function.


What is the name given to the technique whereby a function argument can be modified by passing a pointer to the argument?

Call_by_reference


When argument are passed by value the function works with the original arguments in the calling program?

When a function is passed by value the calling function makes a copy of the passed argument and works on that copy. And that's the reason that any changes made in the argument value does gets reflected to the caller.


What is mean by'pass by value'?

If you mean 'call by value' then, it means a method of passing argument to a function in c++. In this a copy of argument is passed to function and changes are not reflected.


What is the difference between parameters and arguments in VB?

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.