end Statement

The end statement indicates both the end of a series of statements executed conditionally from a then or else condition or the physical end of the program.

Syntax

end

Description

The end statement is used in two ways:

Example(s)

This example reprompts for ans if the previous ans is n.

10 *

input ans

if ans=’n’ then

print ’Please retype ’:

goto 10

end

If the md file does not exist, a warning message is printed and program execution stops. Notice that stop is the FlashBASIC or BASIC run-time directive that indicates the termination of run time. The end statement indicates the end of the multiple line then statement. Without the stop, program execution continues with the next statement after the end statement.

open ’md’ to md else

print ’Cannot open file’

stop

end

crt ’File opened’

See Also

abort Statement

stop Statement

then Clause

then/else Statement Blocks