|
|
|
WRITING A PROGRAM Using the keys explained above, you can now write a GWBASIC program and make any modifications needed. For example, type in the short program below. When entering a program, you must always press the <Return> key at the end of each line so that the computer will accept the line into memory.
LIST <List> shows that what you have entered. If you have made a mistake anywhere on the current line, use the <BackSpace>key to correct and retype. Once the program is in memory, you can list (display) your program with the LIST command. At the Ok prompt, type
The program currently in memory will be listed. At the Ok prompt you can make any changes to what is on the screen.For instance, move to line 50 and change it to read:
Note that, once you have made any changes you must press the <Return> key on that line before moving to another. SAVING A PROGRAM Your program is kept in memory as long as the computer is on and you do not execute the LOAD command. If you would like to save your newly written program, you must enter the SAVE command. To do so, type
where B: is the drive on which you are storing the file and filename is the name you are giving to the program. A filename can be up to 8 characters long and must start with a letter. It cannot have any special characters -- only letters and numbers. will show you how to move the cursor on the screen.
|