Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Talk:Undefined variable

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 19 years ago by Pfunk42

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

I totally agree. "Definition" == assignment. This article describes, as its first sentence even suggests, undeclared variables. --pfunk42 11:41, 9 November 2006 (UTC)Reply