Exit Statement

Terminates the current application.

Syntax

Exit [EndEvents]

Comments

The current application is terminated immediately without calling any OnEndXXX event procedures if you call this without EndEvents.   When you enter the optional EndEvents, then all OnEndXXX events will be called and executed.  

The following table shows ATEasy handling end events upon exit statement under different versions and builds:
 

ATEasy Version

Build

OnEndXXX Events Handling

3.0

all

End events are not called at all.

4.0

92

End events are called without the optional EndEvents.

5.0

102

End events are called without the optional EndEvents.

4.0

94 & above

End events are called with the optional EndEvents.

5.0

104 & above

End events are called with the optional EndEvents.

Examples

If iSelection = enQuit Then Exit

 

! make sure that we have no empty program or driver

 

for lIndex=0 to App.ProgramsCount-1

ob=App.Programs(lIndex)
if ob=Nothing

MsgBox("One of programs' shortcut is empty - exiting")

Exit EndEvents

endif

next

See Also

Run, Test, Task, Abort Statement, ExitCode Property (AApp) - v9