GLBasic forum

Feature request => IDE/Syntax => Topic started by: 9940 on 2009-Jul-05

Title: Extend header files
Post by: 9940 on 2009-Jul-05
In the header files you can't assign variables out of a function or a sub.
But may be useful if you can declare global variables (like costants).

main.gbas
Code (glbasic) Select

PRINT VERSION$, 100, 100
SHOWSCREEN
MOUSEWAIT


include1.gbas
Code (glbasic) Select

GLOBAL VERSION$ = "1.000" //error : command not inside function or sub
Title: Re: Extend header files
Post by: amarliani on 2009-Jul-05
There is a strange bug in the editor which will be fixed in new V 7. Add a blank line at the bottom of all your gbas files an this error disappears.
Title: Re: Extend header files
Post by: Schranz0r on 2009-Jul-05
the last update fixed that !
you have the last update?
Title: Re: Extend header files
Post by: kaotiklabs on 2009-Jul-06

As long as I know needing to add a blank file at the end of the file is still unpatched.
Title: Re: Extend header files
Post by: Kitty Hello on 2009-Jul-06
It's fixed in version 7, which is not out, yet. But soon. Promise ;)