Global and module variables using the same name

Program variable names must be different in global and module scope.

Since version 2.00, when you declare a module variable with the same name as a global variable, a compilation error must be thrown.

This is critical to avoid confusion with the variable usage:
GLOBALS
  DEFINE level INTEGER
END GLOBALS
GLOBALS "globals.4gl"
DEFINE level INTEGER
FUNCTION func1()
  LET level = 123  -- is this the global or the module variable?
END FUNCTION

Before version 2.00, the compiler did not detect this and the module variable was used, but one might want to use the global variable instead!

If you have module variables defined with the same name as global variables, the compiler now raises the following error:
-4319: The symbol 'variable-name' has been defined more than once.

You can easily fix this by renaming the module variable. There is no risk in doing this modification, because in versions before 2.00, the module variable was used, not the global variable.

Remark: The compiler now also detects duplicate global variable declaration. Just remove the duplicated lines in your source.