Undefined variable - Wikipedia, the free encyclopedia 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.