I think I've found a fairly decent way of being able to embed data into a program at compile-time.
The data needs to be in C/C++, and needs to be REQUIRE'd (although using #include could work too).
You do need to have a slight bit of INLINE/ENDINLINE stuff to make the data available :
For example :
REQUIRE "defaultLanguage.c"
INLINE
}
extern char *defaultLanguage[];
namespace __GLBASIC__ {
ENDINLINE
And then just access the data in an INLINE function (but not in an extended type), eg :
FUNCTION Localise_TextHelper%:BYREF index%,BYREF token$,BYREF value$
token$=""
value$=""
INLINE
if (defaultLanguage[index])
{
token_Str=DGStr(defaultLanguage[(int) index]);
INC(index);
if (defaultLanguage[(int) index])
{
value_Str=DGStr(defaultLanguage[(int) index]);
INC(index);
}
return (DGNat) TRUE;
}
return (DGNat) FALSE;
ENDINLINE
ENDFUNCTION