This shows you the differences between two versions of the page.
— |
en:onstop [2020/09/18 18:44] (current) admin created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== OnStop (Statement) ===== | ||
+ | |||
+ | ==== Format ==== | ||
+ | **onstop** [[labelprogramsyntax|subroutine_name()]] | ||
+ | |||
+ | ==== Description ==== | ||
+ | Causes the subroutine to be executed when the stop button is pressed. If the subroutine is allowed to return, the program will continue running as if not stopped. | ||
+ | |||
+ | ==== Example ==== | ||
+ | |||
+ | < | ||
+ | onstop handleStop() | ||
+ | |||
+ | subroutine handleStop() | ||
+ | x = confirm(" | ||
+ | if x then end | ||
+ | end subroutine | ||
+ | |||
+ | for t = 1 to 10 | ||
+ | print t | ||
+ | pause 1 | ||
+ | next t | ||
+ | |||
+ | print ' | ||
+ | </ | ||
+ | |||
+ | ==== See Also ==== | ||
+ | {{page> | ||
+ | |||
+ | ==== History ==== | ||
+ | |2.0.99.1|New To Version| | ||
+ | |||