Return type for functions that do not output values when called
This article is about the void type in computer programming languages. For the concept of a void pointer, see Pointer (computer programming) § C and C++. For types of astronomical voids, see Void (astronomy). For other uses, see Void (disambiguation).
The void type, in several programming languages derived from C and Algol68, is the return type of a function that returns normally, but does not provide a result value to its caller. Usually such functions are called for their side effects, such as performing some task or writing to their output parameters. The usage of the void type in such context is comparable to procedures in Pascal and syntactic constructs which define subroutines in Visual Basic. It is also similar to the unit type used in functional programming languages and type theory. See Unit type#In programming languages for a comparison.
C and C++ also support the pointer to void type (specified as void *), but this is an unrelated notion. Variables of this type are pointers to data of an unspecified type, so in this context (but not the others) void * acts roughly like a universal or top type. A program can convert a pointer to any type of data (except a function pointer) to a pointer to void and back to the original type without losing information, which makes these pointers useful for polymorphic functions. The C language standard does not guarantee that the different pointer types have the same size or alignment.
The voidtype, in several programming languages derived from C and Algol68, is the return type of a function that returns normally, but does not provide...
true unit type and the voidtype is that the unit type may always be the type of the argument to a function, but the voidtype cannot be the type of an argument...
values Voidtype, in programming languages, a keyword indicating the absence of data Void set or empty set, the mathematical set with no elements Void, a...
incomplete type is a structure or union type whose members have not yet been specified, an array type whose dimension has not yet been specified, or the void type...
floating-point numbers, and Booleans, other built-in types include: The voidtype and null pointer type nullptr_t in C++ and C23 Characters and strings (see...
The pointer to voidtype can accept any non-function pointer, even though the voidtype itself is not the universal type but the unit type. Since C++17...
Local Void is a vast, empty region of space, lying adjacent to the Local Group. Discovered by Brent Tully and Rick Fisher in 1987, the Local Void is now...
In nuclear engineering, the void coefficient (more properly called void coefficient of reactivity) is a number that can be used to estimate how much the...
The Void Trilogy is a space opera series by British author Peter F. Hamilton. The series is set in the same universe as The Commonwealth Saga, 1,200 years...
returning a value of type int. Various mechanisms are used for the case where a subroutine does not return any value, e.g., a return type of void is used in some...
"non-nullable type" addressing void safety. The F# language, a functional-first language from Microsoft Research running on .NET framework, is void-safe except...
Dark Void is a third-person shooter video game developed by Airtight Games and published by Capcom. It was originally released in January 2010 for the...
C99 can be portably expressed as ((void *)0), the integer value 0 converted to the typevoid* (see pointer to voidtype). The C standard does not say that...
A Void, translated from the original French La Disparition (lit. "The Disappearance"), is a 300-page French lipogrammatic novel, written in 1969 by Georges...
This is a list of voids in astronomy. Voids are particularly galaxy-poor regions of space between filaments, making up the large-scale structure of the...
The KBC Void (or Local Hole) is an immense, comparatively empty region of space, named after astronomers Ryan Keenan, Amy Barger, and Lennox Cowie, who...
annulment makes a void marriage or a voidable marriage null. A difference exists between a void marriage and a voidable marriage. A void marriage is a marriage...
of the type, and that is why a product with it is always isomorphic to the other operand. For type sum, the identity object is the voidtype, which stores...
Void Linux is an independent Linux distribution that uses the X Binary Package System (XBPS) package manager, which was designed and implemented from scratch...
A void marriage is a marriage that is unlawful or invalid under the laws of the jurisdiction where it is entered. A void marriage is invalid from its beginning...
Seventh Void was an American doom metal band composed of vocalist/guitarist Kenny Hickey and drummer Johnny Kelly (both formerly of Type O Negative), guitarist...
Porosity or void fraction is a measure of the void (i.e. "empty") spaces in a material, and is a fraction of the volume of voids over the total volume...
In type theory, an empty type or absurd type, typically denoted 0 {\displaystyle \mathbb {0} } is a type with no terms. Such a type may be defined as the...
usage of one type as if it were a different type (consider the common use of void* in C). Coercion is usually a symptom of weak typing. Conversion, on...