HP 9000 200 Series Manual page 126

Using the basic 5.0/5.1 system
Table of Contents

Advertisement

The BASIC System Checks Syntax
Before storing a program line, the computer checks for syntax! errors, and also changes
the letter-case of keywords and identifiers (see the following section, "upper-case or lower-
case Letters?" for details).
Immediate syntax checking is one big advantage of writing programs on this BASIC
system. A great many programming errors can be detected at program-entry time,
which increases the chances of having a program run properly and cuts down debugging
time. If the syntax of the line is correct, the line is stored, and the next line number
appears in front of the cursor.
If the system detects an error in the input line, it displays an error message immediately
below the line and places the cursor at the location it blames for the error.
10 PRINT "Short program.
Error
985
Invalid quoted string
20
END
Keep in mind that there is an endless variety of human mistakes that
migh~
occur,
and that BASIC is not very good at dealing with even slight ambiguities. As a result,
you might not always agree with its diagnosis of the exact error or the error's location.
However, an error message definitely indicates that something needs to be fixed. There
is a complete list of error messages and their meanings in the "Errors" appendix of the
BASIC Language Reference
and
BASIC Condensed Reference
manuals.
1
Syntax is a term used to describe the way in which keywords, parameters, etc. are put together to form
a legal statement.
Editing and Storing Programs
6-5

Advertisement

Table of Contents
loading

This manual is also suitable for:

9000 300 series

Table of Contents