Chapter 10 I
BASIC
Ke.ywords
END
Statement
END
Ends program execution and closes all files.
You may place this statement anywhere in the program. It forces
execution to end at some point other than the last sequential
line.
An END statement a t the end of a program is optional.
Sample Program
4 0 I N P U T S 1 ,
S 2
5 0 GOSUB 1 0 0
5 5 P R I N T H
6 0 END
1 0 0 H = S Q R < S l * S l
+
S 2 * S 2 )
1 1 0 R E T U R N
Line 60 prevents program control from continuing through the
subroutine. Line 100 may be accessed only by a branching state-
ment, such as
GOSUB
in Line 50.
147