will recursion still work?
The fix is exactly to allow recursion all the way. QB64 had the bug described in my first post that wouldn't allow a function without parameters to be called recursively, and the new patch fixes that.
To be clear: QB64 didn't behave like QuickBASIC 4.5 did - any code that relied on this bug wouldn't have worked in QB4.5, due to that. We're catching up with a long-standing issue, one that will require some getting used to.
This is why we need as many of you to help us figure out if anything won't work as outlined in my first post in this thread, like Steve and Rho have been doing (thanks, you two!).
Hello
What's the problem?.
For me it displays as a result of compilation: 5 stars and 1
I have no idea what version of QB64 you're using. That interface sure looks outdated. The code I shared in the first post of this thread won't produce the proper results in v1.5. Please let us know more details.
It seems to work as it should. I also welcome this upgrade, but I am absolutely sure that it is only a matter of time before this thing catches up with me. It's great that it now works. My current programs all working as expected in this version.
That's great to hear, thanks Petr!
How much of a need is there for parameter-less functions?
It's not proper that we support recursion half-way - and the new patch will fix a long-standing issue. We've always aimed to get as close as possible to 100% compatibility with QB4.5 code, and this is a step forward.
As explained before, any existing code that treated the function name as a regular variable was relying on a buggy feature, and it'll take some getting used to the fixed (right) way.
Boy, do I got a lot of rewriting to do now, just to keep all my libraries up to date once this goes live!
We will have a good chunk of code-reviewing to do all over the place, as you pointed out. We have the Samples gallery and also the wiki - which btw contains an example in the very page for Function that relies on the buggy implementation we're now fixing.
Very good point @bplus to take into consideration. Will probably waiting a couple more days before start refactoring my stuff, to see if @FellippeHeitor and the other responsible DEVs rethink the whole thing and come up with a solution, which makes less impact on existing code (maybe another Meta command to switch between the old/new behavior? - If it ever was worth to add a new meta, then for this one, it would avoid the whole effords mentioned by Steve).
The decision to make this a a new major version release (v2.0) stems from all that's outlined at
https://semver.org/ <-- recommended reading.
The tl;dr version is: we're making a fix that can break existing functionality - that grants the version bump while clearly stating "you folks may need some extra work, here's how it works now".
And we're glad it will from 2.0 onwards work as it should always have.
@All: testing continues, I thank you all for joining the ride and please let me know if all works as outlined in the first post in this thread.