argument

(redirected from Argument pattern)
Also found in: Dictionary, Thesaurus, Medical, Legal, Financial, Wikipedia.

argument

1. Logic
a. a process of deductive or inductive reasoning that purports to show its conclusion to be true
b. formally, a sequence of statements one of which is the conclusion and the remainder the premises
2. Logic an obsolete name for the middle term of a syllogism
3. Maths
a. an element to which an operation, function, predicate, etc., applies, esp the independent variable of a function
b. another name for amplitude (sense 5) of a complex number

argument

[′är·gyə·mənt]
(astronomy)
An angle or arc, as in argument of perigee.
(computer science)
A value applied to a procedure, subroutine, or macroinstruction which is required in order to evaluate any of these.

argument

(programming)
(Or "arg") A value or reference passed to a function, procedure, subroutine, command or program, by the caller. For example, in the function definition

square(x) = x * x

x is the formal argument or "parameter", and in the call

y = square(3+4)

3+4 is the actual argument. This will execute the function square with x having the value 7 and return the result 49.

There are many different conventions for passing arguments to functions and procedures including call-by-value, call-by-name, call-by-reference, call-by-need. These affect whether the value of the argument is computed by the caller or the callee (the function) and whether the callee can modify the value of the argument as seen by the caller (if it is a variable).

Arguments to functions are usually, following mathematical notation, written in parentheses after the function name, separated by commas (but see curried function). Arguments to a program are usually given after the command name, separated by spaces, e.g.:

cat myfile yourfile hisfile

Here "cat" is the command and "myfile", "yourfile", and "hisfile" are the arguments.

argument

In programming, a value that is passed between programs, subroutines or functions. Arguments are independent items, or variables, that contain data or codes. When an argument is used to customize a program for a user, it is typically called a "parameter." See argc.