Jump to content

Talk:Undefined variable

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by File Not Found (talk | contribs) at 02:47, 9 February 2006. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The original definition given was this:

  • An undefined variable in a computer program is a variable name that is called by the program but which has not been previously assigned a value by that program.

I think that would describe an "uninitialized variable". For example,

// C
int x;
printf("%d", x);
// x is declared but uninitialized
// Java
Frame x = null;
x.show();
// x is declared but set to null

Some clarification may be needed of the terms

  • undefined variable
  • undeclared variable
  • uninitialized variable
  • NULL (C), null (Java(, nil, or undef (Perl) as in reference or pointer type.

File Not Found 04:01, 8 February 2006 (UTC)[reply]