<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Null_function</id>
	<title>Null function - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Null_function"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Null_function&amp;action=history"/>
	<updated>2026-05-04T21:05:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=Null_function&amp;diff=4094966&amp;oldid=prev</id>
		<title>imported&gt;Remsense at 04:38, 6 June 2025</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Null_function&amp;diff=4094966&amp;oldid=prev"/>
		<updated>2025-06-06T04:38:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Short description|Type of subroutine in computer science}}&lt;br /&gt;
{{distinguish|identity function|empty function|zero function}}&lt;br /&gt;
{{refimprove|date=September 2017}}&lt;br /&gt;
In [[computer science]], a &amp;#039;&amp;#039;&amp;#039;null function&amp;#039;&amp;#039;&amp;#039; (or &amp;#039;&amp;#039;&amp;#039;null operator&amp;#039;&amp;#039;&amp;#039;) is a [[subroutine]] that leaves the [[program state]] unchanged. When it is part of the [[instruction set]] of a [[central processing unit|processor]], it is called a [[NOP (code)|NOP]] or NOOP (No OPeration).&lt;br /&gt;
&lt;br /&gt;
Mathematically, a (computer) function &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; is null if and only if its execution leaves the program state &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; unchanged. That is, a null function is an [[identity function]] whose [[domain of a function|domain]] and [[codomain]] are both the [[state space]] &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; of the program, and for which:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;f(s)=s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for all elements &amp;lt;math&amp;gt;s \in S&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Less rigorous definitions may also be encountered. For example, a function may take a single operand, [[type conversion|transform]] it into a new [[data type]], and return the result.&amp;lt;ref&amp;gt;Example of a [[type conversion]] function labeled as a &amp;quot;null function&amp;quot;: [http://www.thinkage.ca/english/gcos/expl/nsc/lib/0nullf.html _NULLF - null function.]&amp;lt;/ref&amp;gt; While such usages bear a strong visual resemblance to identity functions, they create or alter a binary data value and thus change the program state. From a software maintainability perspective it is better to identify such &amp;quot;minor&amp;quot; alternations of state explicitly, since calling them null functions provides future maintainers of the code with no insights on their actual purposes.&lt;br /&gt;
&lt;br /&gt;
== Uses ==&lt;br /&gt;
Null functions have several uses.&lt;br /&gt;
&lt;br /&gt;
During [[software development]], null functions with the same names and [[type signature]]s as a planned functions are often used as [[method stub|stub]]s—that is, as non-functional placeholders that allow the incomplete body of code to be compiled and tested prior to completion of all planned features.&lt;br /&gt;
&lt;br /&gt;
Null functions, particularly the NOP variety, are also used to provide delays of indeterminate length within [[infinite loop|wait loop]]s. This is a common strategy in dedicated [[embedded system overview|device controller]]s that must wait for an external input and have no other tasks to perform while they are waiting. Such wait loops are also used in [[software applications]] on larger [[multiprocessing]] computer systems. However, for multiprocessing systems a better approach is to use [[operating system]] functions that let other processes use the [[CPU]] during the waiting period.&lt;br /&gt;
&lt;br /&gt;
A third use of null functions is as the definition of a program feature that, if created inadvertently, is almost always deleterious. Unintended null functions can arise during the development of complex programs, and like [[dead code]], such occurrences indicate serious flaws in program structures.&lt;br /&gt;
&lt;br /&gt;
A null function or method is often used as the default behavior of a revectorable function or overrideable method in an object framework.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[IEFBR14]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*{{cite IETF|rfc=2410|title=The NULL Encryption Algorithm and Its Use With IPsec|date=November 1998|publisher=[[Internet Engineering Task Force|IETF]]}} Makes humorous statements about the NULL encryption algorithm.&lt;br /&gt;
&lt;br /&gt;
{{nulls}}&lt;br /&gt;
&lt;br /&gt;
{{DEFAULTSORT:Null Function}}&lt;br /&gt;
[[Category:Subroutines]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Remsense</name></author>
	</entry>
</feed>