In computer programming, a variadic function is a function of variable arity; that is, one which can take different numbers of arguments. Support for variadic functions differs widely among programming languages. There are many mathematical and logical operations which come across naturally as variadic functions. For instance, the summing of numbers or the concatenation of strings or other sequences are operations that can logically apply to any number of operands.

PropertyValue
dbpprop:abstract
  • In computer programming, a variadic function is a function of variable arity; that is, one which can take different numbers of arguments. Support for variadic functions differs widely among programming languages. There are many mathematical and logical operations which come across naturally as variadic functions. For instance, the summing of numbers or the concatenation of strings or other sequences are operations that can logically apply to any number of operands. Another operation which has been implemented as a variadic function in many languages is output formatting. The C function printf and the Common Lisp function format are two such examples. Both take one argument which specifies the formatting of the output, and any number of arguments which provide the values to be formatted. Variadic functions can expose type-safety problems in some languages. For instance, C's printf, if used incautiously, can give rise to a class of security holes known as format string attacks. The attack is possible because the language support for variadic functions is not type-safe; it permits the function to attempt to pop more arguments off the stack than were placed there -- corrupting the stack and leading to unexpected behavior. Variadic functionality can be considered complementary to the apply function, which takes a function and a list/sequence/array as arguments and then calls the function once, with the arguments being the elements of the list.
  • Nella programmazione, una funzione variadica è una funzione di arietà variabile, ossia una funzione che può accettare un numero variabile di argomenti. La possibilità di implementare le funzioni variadiche e il supporto per le stesse differisce tra i diversi linguaggi di programmazione.
dbpprop:hasPhotoCollection
dbpprop:reference
rdf:type
rdfs:comment
  • In computer programming, a variadic function is a function of variable arity; that is, one which can take different numbers of arguments. Support for variadic functions differs widely among programming languages. There are many mathematical and logical operations which come across naturally as variadic functions. For instance, the summing of numbers or the concatenation of strings or other sequences are operations that can logically apply to any number of operands.
  • Nella programmazione, una funzione variadica è una funzione di arietà variabile, ossia una funzione che può accettare un numero variabile di argomenti. La possibilità di implementare le funzioni variadiche e il supporto per le stesse differisce tra i diversi linguaggi di programmazione.
rdfs:label
  • Variadic function
  • Funzione variadica
owl:sameAs
skos:subject
foaf:page
is dbpprop:redirect of
is owl:sameAs of