Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 803 Bytes

undefined.md

File metadata and controls

12 lines (9 loc) · 803 Bytes

undefined

An undefined variable in the source code of a computer program is a variable that is accessed in the code but has not been previously declared by that code.

In some programming languages, an implicit declaration is provided the first time such a variable is encountered at compile time. In other languages such a usage is considered to be sufficiently serious that a diagnostic being issued and the compilation fails.

Some language definitions initially used the implicit declaration behavior and as they matured provided an option to disable it (e.g. Perl's "use warnings" or Visual Basic's "Option Explicit").1


[1] Undefined variable, Wikipedia. (2016). https://en.wikipedia.org/w/index.php?title=Undefined_variable&oldid=724502181 (accessed March 10, 2020).