I declared a global variable in global.sbh file. After declaring I assigned a value to this variable. After including this file in a .rec file an error is generated while compiling the .rec file. The error is
GLOBAL.SBH(3) Error: Illegal statement
On line 3, I am trying to assign the value to variable.
What can be the cause?
"A highly advanced bug is indistinguishable from a feature."
A highly advanced bug is indistinguishable from a feature.
Here is another method, for this catch22:
Create 2 Header files - named say H1 and H2
Create a Lib file - named say L.
H1 will contain all the global variables.
L has a init() function which initialize all your global variables.
H2 contains the declaration of the functions in Lib file, including the init(). Include this H2 as Header file in script.
Now make all your scripts call this init() and you are all set. It includes all variables of H1 as well as Declarations of functions reqd.,