-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increase Sub/Function Id Limit #404
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
d7498d1
Increase Sub/Function Id Limit
SteveMcNeill 48f6514
Merge branch 'main' into main
SteveMcNeill 45bf68f
Error Report before REDIM, not after
SteveMcNeill 3ea8457
Merge branch 'main' of https://github.com/SteveMcNeill/QB64pe-Experim…
SteveMcNeill File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this rather be
IF sflistn > 25000 THEN
instead ofubound_sf
?? Also better move the error checking block before the REDIM block.As it currently is, it would unnecessarily REDIM the arrays to 26000 elements and then error out on the next SUB/FUNC, as
ubound_sf
is only retrieved at the head of the REDIM block.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. And with the misuse of ubound_sf there, it'd never have a chance to STOP erroring out. sflistn resets itself and rebuilds itself with each new pass of the IDE (so if you insert a SUB between subs, it'll take the old id numbers from them and try and keep sub numbering in order), so when someone removes a SUB, that value should drop by one, in total. The idea here is for the IDE to just toss an error message, without crashing, and which the user could then consolidate subs/functions (or remove unneeded ones), to get back below that 25,000 limit and stop the error from ever occurring.
Honestly though, I can't hardly imagine that anyone would ever have 25,000 subs and functions in a program. From the day QB64 was first conceived, to now, Grymm has been the only person to ever report the glitch with a cap of just 1,000. I truly think if that cap is ever reached, it's going to be because of some endless loop on our part in the IDE, and not something the user can ever fix to begin with. :)