With this :
DEBUG x%
FUNCTION moo%:
GLOBAL x%
ENDFUNCTION
Whilst it doesn't cause compiling to fail, it does produce a "variable already exists" warning message if the variable isn't given a variable, like :
FUNCTION moo%:
GLOBAL x%=5
ENDFUNCTION
There is unfortunately a slight problem with the code too - try and run it and the program seems to hang before the DEBUG command...
Therefore I feel that a GLOBAL in a function (and possibly subroutine) should produce a compiler error.
Strange. It worked for me. It debugged "0".
Add some code after the DEBUG, maybe?
I also tried with :
DEBUG "1\n"
DEBUG x%
DEBUG "2\n"
FUNCTION moo%:
GLOBAL x%
ENDFUNCTION
Just get "starting debug session"
Try to compile again, and I get the "debugger is still running" message