END
Root / Documentation / [.]

The
END
keyword has two meanings based on context: ending the program and ending a function body.
End of Program
If anEND
statement on its own is used, the program ends
PRINT "Will see this" END PRINT "Won't see this"The program ends automatically when the end of the code is reached, so
END
is not always necessary.
End of Function
END
is also used to end a function definition.
DEF MYFUNC PRINT "HELLO" END '<-- end of functionNote that this means
END
cannot be used inside of a function to end the program. In some situations this can result in a Syntax error
.
DEF KILL PRINT "The program is now over!!!!" END '<-- BASIC thinks the function ends here END '<-- BASIC thinks the program ends hereIf you must end the program from within a function, you will have to use
STOP
.No posts yet (will you be the first?)