Request: Make BCC-version available as global const (BCC_VERSION)
Heya,
I just came across an old remark in my game code:
'TODO: can be "struct" as soon as all NG releases ship with the new/fixed
' bcc (newer than begin of April 2022)
Type STextParseInfo
...
I think it would be a good idea to append some numeric value as global constant for easy access inside BlitzMax-code ... the BCC version. While of course the whole thing is also interesting for modules (module revision numbers) it at least would allow to throw an error if things are compiled with a BCC version which you know has a bug.
What I mean is code like this:
If BCC_VERSION < 130 Then Throw "Please use a BCC compiler version newer than 1.30 as there is a bug with XYZ in older versions."
(yes this won't help against cached/prebuilds but at least avoids that people with eg the "last stable NG release" try to compile my game with a bug-containing bcc).
This seems like something a ? conditional would be more appropriate for. You can't conditionally compile code based on a Const; for instance, your example (compiling STextParseInfo as a Type on older versions and as a Struct on newer versions) wouldn't be possible with. But it would be possible with ?. Currently we have ? BmxNg to distinguish between legacy BlitzMax and NG, but maybe this could be treated as a numerical value and allow you to write conditions like ? BmxNg > 130 as well?