03-26-2025, 11:05 PM
Hello everyone, I always follow you and continue to appreciate the project and everyone's effort to improve and keep our beloved QB64 alive!
I’m sharing with you a code that I thought of and partially developed (and obviously then refined with the help of AI) to interpret a string with a calculation expression, just like scientific calculators do with expressions. I believe it is useful and I hope it helps someone.
If you test the code, everything will be clearer.
Pass to the function - in the example, this first function is not there because the expression is in the main code - something like:
a# = calc# ("1 + (variable#(73) ^ 2 + (variable#(74) + variable#(88) / 100) ) * 100")
where variable#() are obviously the variables to be processed. Feel free to modify the expression by adding and removing operators, and you will (always?) get the correct result.
Let me know! Maybe something like this already exists and I just don't know about it yet, or perhaps it's not as useful as it seems to me.
I’m sharing with you a code that I thought of and partially developed (and obviously then refined with the help of AI) to interpret a string with a calculation expression, just like scientific calculators do with expressions. I believe it is useful and I hope it helps someone.
If you test the code, everything will be clearer.
Pass to the function - in the example, this first function is not there because the expression is in the main code - something like:
a# = calc# ("1 + (variable#(73) ^ 2 + (variable#(74) + variable#(88) / 100) ) * 100")
where variable#() are obviously the variables to be processed. Feel free to modify the expression by adding and removing operators, and you will (always?) get the correct result.
Let me know! Maybe something like this already exists and I just don't know about it yet, or perhaps it's not as useful as it seems to me.

