10-18-2023, 01:33 PM
Points 1 and 2
Initialing every routine? Yikes!
It should be enough to Author the library and more important IMHO to date even time the revisions for fast and furious development. Then 3 years later you can easily find what the most updated version was. A lesson I learned going back to GUI or String Math or oh Interpreter projects.
And see this stuff doesn't matter when copy/paste from toolbox.
Another advantage of toolbox you can see and update the routines to your hearts content and app needs without worry of messing up or being compatible with old code.
Points 3 and 4 ehhh...
There are times when you need to use the ByRef default to get more than 1 return value from a Sub or function because QB64 Functions are limited to primitive types and there is no ByVal in QB64!
Rule of Sub or Function: If you change the incoming value of parameter and you don't want the routine returning that value make a copy of it and use that in routine. So check for a change of parameter value when building routine. That is good hard rule to follow in my book.
#5 yep! hard code the array indexes
#6 restore? absolutely for general dialogue functions coming from outside app.
Or check _dest, col, row, color and _display status before every PRINT or graphics to screen.
#7 might be restated use Option _Explicit as best practice principle and avoid Options that defeat optimal use of Option _Explicit. _NoPrefix is a bad practice IMHO along with Option Base and Dynamic.
Initialing every routine? Yikes!
It should be enough to Author the library and more important IMHO to date even time the revisions for fast and furious development. Then 3 years later you can easily find what the most updated version was. A lesson I learned going back to GUI or String Math or oh Interpreter projects.
And see this stuff doesn't matter when copy/paste from toolbox.
Another advantage of toolbox you can see and update the routines to your hearts content and app needs without worry of messing up or being compatible with old code.
Points 3 and 4 ehhh...
There are times when you need to use the ByRef default to get more than 1 return value from a Sub or function because QB64 Functions are limited to primitive types and there is no ByVal in QB64!
Rule of Sub or Function: If you change the incoming value of parameter and you don't want the routine returning that value make a copy of it and use that in routine. So check for a change of parameter value when building routine. That is good hard rule to follow in my book.
#5 yep! hard code the array indexes
#6 restore? absolutely for general dialogue functions coming from outside app.
Or check _dest, col, row, color and _display status before every PRINT or graphics to screen.
#7 might be restated use Option _Explicit as best practice principle and avoid Options that defeat optimal use of Option _Explicit. _NoPrefix is a bad practice IMHO along with Option Base and Dynamic.
b = b + ...