请输入您要查询的百科知识:

 

词条 Unreferenced variable
释义

  1. Examples

{{Unreferenced|date=February 2007}}

An unreferenced variable in the source code of a computer program is a variable that is defined but which is never used. This may result in a harmless waste of memory. Many compilers detect such variables and do not allocate storage for them (i.e., "optimize away" their storage), generally also issuing a warning as they do.

Some 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:

 int main(void) {   int i, j;   for (i=0; i<10; i++)      printf("%d", i);   return 0; }

In this example, j is an unreferenced variable.

{{DEFAULTSORT:Unreferenced Variable}}{{Compu-prog-stub}}

1 : Variable (computer science)

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/25 22:31:11