Content deleted Content added
m →Multiple dimensions: lang="numpy" |
m →Variable number of parameters: <source> |
||
Line 45:
In the [[C (programming language)|C programming language]], an ellipsis is used to represent a [[variadic function|variable number of parameters]] to a [[function (programming)|function]]. For example:
:
The above function in C could then be called with different types and numbers of parameters such as:
:
and
:
[[C99]] introduced macros with a [[variadic macro|variable number of arguments]].<ref>[https://gcc.gnu.org/onlinedocs/gcc/Variadic-Macros.html Variadic Macros - Using the GNU Compiler Collection (GCC)]</ref>
Line 60:
As of version 1.5, [[Java (programming language)|Java]] has adopted this "varargs" functionality. For example:
:
===PHP===
Line 75:
Produces this output:
<source lang="php">
array(3) {
[0]=>
Line 84:
int(5)
}
</source>
== Multiple dimensions ==
|