program command_exit; procedure func; begin WriteLn('Before exit'); exit; WriteLn('After exit'); end; begin func; end. {if you want to improve this code, please send code to me tranleduy1233@gmail.com}