Content deleted Content added
m Robot - Speedily moving category Variable (computer programming) to Category:Variable (computer science) per CFDS. |
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 |
||
(14 intermediate revisions by 7 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.
==Examples==
[[C (programming language)|C]]:
<
int main(void)
{
Line 12 ⟶ 14:
return 0;
}
</syntaxhighlight>
In this example, '''j''' is an unreferenced variable.
{{Reflist}}
|