

Again, the computer closes all open files before running a new program. We can either run a command from the very beginning, or from a specific line. The RUN command is used to execute a program.

If the storage device already stores another file by same name, the computer will replace the old file with the program file. It is important to specify the name of the program. The SAVE command is used to save a program. Adding allows the program to be executed as soon as it is loaded. This means that the computer can start reading the program and follow its instructions. Once the program has been loaded, it can be executed. The computer has to close all running programs before loading a new program. The LOAD command is used to transfer a program from a secondary storage medium to primary storage. LIST 10-15 (to list lines 10-15 of the program) Syntax: LIST (to list all the lines in the program) We can also press the F1 key to run the LIST command. This is useful because it enables us to have a look at the program to spot any errors. The LIST command displays the whole program, or part of the program, that the computer is currently running. The CLS command is used for clearing the screen. Commands are always typed in capital letters. Let’s learn about the function and syntax of some useful commands in GW-BASIC. The same command can be used in the same form with any program. Commands are instructions that tell the computer to perform a specific action.
