BB___END

=END= toc

Description
> This command terminates the program, procedure or decision structure

Syntax

 * 1) END
 * 2) END IF
 * 3) END SELECT
 * 4) END FUNCTION
 * 5) END SUB

Hint
> JB will always add an additional END command to the very end of your program code, to make sure the program contains a valid termination. More than one END statement is allowed.

> For the program termination, STOP is identical to END, but END is preferred.

> If your program has windows, as in a Graphical User Interface (GUI) program, be sure to include the END statement; otherwise, when the program finishes, the windows may be closed but the program may still reside in memory - unseen - and consume processing resources.

END and closing MAINWIN
If you make an EXE of a MAINWIN-only program, then END will close MAINWIN. If you run that (MAINWIN-only) TKN file from your main program via runtime engine, code format="lb" run "jbrun101.exe myProg.tkn" code then END will close MAINWIN of the called program (myProg.tkn). But if you run same TKN without using engine code format="lb" run "myProg.tkn" code window of called program (myProg.tkn) will not be closed regardless of having END.

Example
code format="lb" Place a simple, working example of the command here code

Useful Functions
code format="lb" Place a useful function using this command here code