Writing large programs
Full BASIC has the functionality to write large programs.。
1. External procedure definition
External function definitions and external subprograms are independent entities that do not share variables with the main program.
External function definitions and external subprograms are collectively called external procedures.
Using external procedures to divide a program into functions makes it easier to write the program.
2.Modules
One way to share variables between program units is to use variable arguments in external subprograms, but variable arguments cannot be used in external function definitions. Variable sharing can be achieved by using the module facilities.
Variable sharing can also be achieved by defining internal procedures written within a program unit, but internal procedure definitions can easily result in unexpected situations, as variables that you do not want to share can end up being shared.
By using the module function, variables other than those declared as shared are independent for each program unit, so you do not have to worry about unnecessary things.
3.Declaring variables
Full BASIC provides syntax for declaring variables (DECLARE NUMERIC and DECLARE STRING statements).
In Decimal BASIC, checking "Force variable declaration" in Options - Grammar will cause undeclared variables to be flagged as errors during compilation, which helps prevent typos in variable names.
Another advantage is that declaring all variables makes it easier to understand the effective range of variables.