It would also be helpful to the user if programs like BWL2 which have several results, had each output item labeled. In this section we will learn about the use of variables, which helps reduce the amount of stack manipulation which may be required by a program, and we will learn about some input and output techniques which will make the programs more user-friendly. There are two types of variables available for programming, global and local. The variables you learned to use in Chapter 5 of the User's Guide are global variables. They function in programs just as they do in normal operation.
Local variables are specific to a program and live only while the program is running.
It is customary to use upper case letters for global variables and lower case letters for local variables. The local variables are now available to this inner program and can be used the same as global variables. We will see an example of this below. This command allows the program to prompt the user for the data one item at a time. When the command is executed the program pauses with the prompt displayed at the top of the screen and the cursor set to the command line ready for input.