end structure
end
The end keyword marks the end of an object type, on, function, repeat, if, switch, tell, or try structure.
object type
on
function
repeat
if
switch
tell
try
If an end statement is used outside its corresponding structure, a script error is triggered.
on, function, repeat, if, exit, pass
exit
pass