Upgrade Guides for Genero BDL / 2.00 upgrade guide |
Since version 2.00, when you declare a module variable with the same name as a global variable, a compilation error must be thrown.
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!
-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 to do 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.