Content deleted Content added
Citation bot (talk | contribs) Alter: url. URLs might have been anonymized. Add: authors 1-1. Removed parameters. Some additions/deletions were parameter name changes. | Use this bot. Report bugs. | Suggested by AManWithNoPlan | #UCB_CommandLine |
|||
(17 intermediate revisions by 10 users not shown) | |||
Line 1:
{{Short description|Variable which is defined but never used}}
An '''unreferenced variable''' in the [[source code]] of a [[computer program]] is a [[Variable (programming)|variable]] that is defined but which is never used. This may result in a harmless waste of memory.
Some [[coding style|coding guideline]] documents consider an unreferenced variable to be a symptom of a potential coding fault. On the other hand, unreferenced variables can be used as temporary placeholders to indicate further expected future developments in the code.
▲An '''unreferenced variable''' in the [[source code]] of a [[computer program]] is a [[Variable (programming)|variable]] that is defined but which is never used. This may result in a harmless waste of memory (unless the [[compiler]] used detects the situation and does not allocate storage for the variable, perhaps also issuing a warning). Some [[coding style|coding guideline]] documents consider an unreferenced variable to be a symptom of a potential coding fault.
==Examples==
[[C (programming language)|C]]:
<
int main(void)
{
Line 14:
return 0;
}
</syntaxhighlight>
In this example, '''j''' is an unreferenced variable.
== References ==
{{Reflist}}
{{DEFAULTSORT:Unreferenced Variable}}
[[Category:Variable (computer
|