1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 12:40:36 +00:00

Error Report before REDIM, not after

This commit is contained in:
SteveMcNeill 2023-10-30 10:51:14 -04:00
parent d7498d173c
commit 45bf68fad4
2 changed files with 6 additions and 4 deletions

View file

@ -65,3 +65,5 @@ We have a community forum at: https://qb64phoenix.com/forum
We don't currently tweet. Sorry.
Find us on Discord: https://discord.gg/D2M7hepTSx
Join us on Reddit: https://www.reddit.com/r/QB64pe/

View file

@ -11767,16 +11767,16 @@ FOR i = 1 TO idn
unresolved = unresolved + 1
sflistn = sflistn + 1
IF sflistn > 25000 THEN 'manually set a descriptive error message for the user so they know what's happening.
Error_Message = "ERROR: QB64PE currently limits a program to have a maximum of 25,000 subs and functions, and this limit has been exceeded. Please reduce Sub/Function count, or else report this issue with sample code that produced it over at the QB64PE forums, so we can look further into this issue."
GOTO errmes
END IF
ubound_sf = UBOUND(sfidlist) 'all 3 should have the same limit
IF sflistn > ubound_sf THEN
REDIM _PRESERVE sfidlist(ubound_sf + 1000) AS LONG
REDIM _PRESERVE sfarglist(ubound_sf + 1000) AS INTEGER
REDIM _PRESERVE sfelelist(ubound_sf + 1000) AS INTEGER
END IF
IF ubound_sf > 25000 THEN 'manually set a descriptive error message for the user so they know what's happening.
Error_Message = "ERROR: QB64PE currently limits a program to have a maximum of 25,000 subs and functions, and this limit has been exceeded. Please reduce Sub/Function count, or else report this issue with sample code that produced it over at the QB64PE forums, so we can look further into this issue."
GOTO errmes
END IF
sfidlist(sflistn) = i
sfarglist(sflistn) = i2
sfelelist(sflistn) = nelereq '0 means still unknown