You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In QB45, the following is perfectly acceptable (though not pretty):
PRINT "Hello"
SUB foo
PRINT " World"
END SUB
foo
Subs and Functions can appear anywhere in the source, and compile with no issues. One didn't usually see this in QB45 as the IDE had a habit of removing SUB/FUNCTION and placing them at the end of the code, and which one interacted with in separate tabs using F2 (if my memory is correct on all that). If one wants to see this type of code in action, write the BAS file in some other editor (such as NotePad) and then just use QB45 to compile and run it from the command-line. It works 100%, with zero issues.
The most important bonus for SUB/FUNCTION working like this is:
For library files. QB45 only uses single .BM library files. They don't have to be broken up into .BI for the top of the code and .BM for the bottom of the code. One $INCLUDE is enough to hold the whole library properly.
This would be a good step forward to add in support for FN functionality, as FN would just basically be a local FUNCTION after this.
The text was updated successfully, but these errors were encountered:
For library files. QB45 only uses single .BM library files. They don't have to be broken up into .BI for the top of the code and .BM for the bottom of the code. One $INCLUDE is enough to hold the whole library properly.
I would love this! It's a PITA to have to conditionally predict and include stuff in the existing archaic way.
In QB45, the following is perfectly acceptable (though not pretty):
Subs and Functions can appear anywhere in the source, and compile with no issues. One didn't usually see this in QB45 as the IDE had a habit of removing SUB/FUNCTION and placing them at the end of the code, and which one interacted with in separate tabs using F2 (if my memory is correct on all that). If one wants to see this type of code in action, write the BAS file in some other editor (such as NotePad) and then just use QB45 to compile and run it from the command-line. It works 100%, with zero issues.
The most important bonus for SUB/FUNCTION working like this is:
The text was updated successfully, but these errors were encountered: