4

Programming
To write a simple program, click on the Edit window (the one with Empty Program in the titlebar)lomake ilactive,andthen enter the text of your code. If you makemistakes,youcan erase them with the key or you can use BASIC 2 Plus’s sophisticaled built-in editor described in Chapter 2.

Notice how each line appears in the Edit window exactly as you type it; upperandlowercase letters appearas they are input from the keyboard. Butas soonas you press (ormovethe cursor to a new line by soy other means) BASIC 2 Plus’s keywords are transformed into capital tellers, while your invented names and identifiers are transformed into lower case. Noticeatso how carriage retum is displayed as

When your program is ready, setect Run from the Program menu. The fost thing BASIC 2 Plus does is pre-scan the program, checking for syntax and other simple errors. This means that elementary errors in your code will he discovered very quickly, even if they appear in a rarely executed part of the pmgram.

If there are any pre-scan errors, a message will appear in the Dialogue window, and in the Edil window the cursor will move to the firstoffending line. You earthen correct the error, andselect Run again.

When you have removed all the pre-scan errors, selecting Run will slant to mu the program. This time the program will slop at mn-time errors which the pre-scan coutd not discover:
 
RUN
Use
RU N starts executing the current program.
Syntax
RUN
Description
RUN may be executed in a program terminating the program and starting it all over again
 
EDIT
Use
EDIT takes you into the edit window.
Syntax
EDIT
Note
EDIT may only be in Direct Mode.
890

4