WARN7-Local variables that are referenced before they are set
|Top Previous Next|
Local variables that are referenced before they are set (WARN7)
This is a list of all local variables that are referenced before they are set. Probably this is an error, because the values of these identifiers are undefined before they are set. An exception is long strings that are not examined, because they are implicitly initialized upon creation.
Variables marked with the absolute directive are not examined. These identifiers shadow another variable in memory, they are changed whenever the other variable changes.
Examine why these variables are referenced before they are set.
Pascal Analyzer also examines local subprograms that are called. Consider this scenario:
This code triggers a warning, because the local variable I is first referenced by InnerProc. The call to InnerProc occurs before I is set in the main body of Proc. Even if I is only referenced when Condition evaluates to True (in InnerProc), this must happen at some occasion, otherwise that check would be pointless.