Uninitialized variable was referenced.

#3036   Run-time catchable error

Uninitialized variable was referenced.

Additional Information

For 'X' shelf 'Y'.


This error typically occurs when an expression in a variable initializer expression refers to another variable that has not yet been initialized. There are two common ways to trigger this condition:

  • A global variable's initializer invokes a function which has been described only with an elsewhere clause. The function is finally defined below the current variable, as well as other global variables, and attempts to reference those globals. This error message is issued at run-time, since it looks fine when the program is first compiled.
  • A local variable's initializer refers to a variable declared in an outer scope. However, that same variable is later declared in the same scope as the first variable's — at this point OmniMark detects that the variable reference in the initializer is ambiguous, and issues an error message. The solution is to give the second local variable a name that does not conflict with the variable in the outer scope.