(12-12-2022, 03:30 PM)MasterGy Wrote: This must have been a lot of work! very good ! It could be part of something! someone will need it! He doesn't like negative square roots.
It is a part of something, and *YOU* -- and the rest of the QB64 user base -- have been using it for ages, without even knowing it. Every time you type CONST in the IDE, it uses this math evaluator to get the answer to what you type, before assigning it to your CONST value.
Process is basically like this:
CONST foo = _RGB32(255, 255, 255) <-- you type that in the IDE.
Evaluate_Expression takes that "_RGB32(255, 255, 255)" and solves it, substituting it into your CONST foo.
Anytime you use foo in your code after that, it uses the value the math evaluator came up with.
Feel free to plug it in anywhere you need to do math stuffs -- this one has been stress tested by our user base for YEARS now. Its results speak for themselves. I won't swear it's 100% glitch free, but if it was excessively glitchy, we'd see folks posting bug reports on the forum about it everyday -- and that's just not happening.