BASIC

Author Topic: Extend header files  (Read 2055 times)

Offline 9940

  • Mr. Drawsprite
  • **
  • Posts: 53
    • View Profile
Extend header files
« 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
 

Offline amarliani

  • Mr. Polyvector
  • ***
  • Posts: 115
    • View Profile
Re: Extend header files
« Reply #1 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.

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5004
  • O Rly?
    • View Profile
Re: Extend header files
« Reply #2 on: 2009-Jul-05 »
the last update fixed that !
you have the last update?
I <3 DGArray's :D

PC:
AMD RYzen 7 1700 @3.9Ghz, 16GB HyperX Fury 2666Mhz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

Offline kaotiklabs

  • Dr. Type
  • ****
  • Posts: 313
  • Spain is diferent
    • View Profile
Re: Extend header files
« Reply #3 on: 2009-Jul-06 »

As long as I know needing to add a blank file at the end of the file is still unpatched.
Vote Cthulhu! Because the stars are right!!!!
Ia Ia Cthulhu F' tang!

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10675
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Extend header files
« Reply #4 on: 2009-Jul-06 »
It's fixed in version 7, which is not out, yet. But soon. Promise ;)