1

Is there a way in Eiffel to exit a program, possible with a defined exit code like exit in C?

In my case I would like to just end the program like exit(0) would do.

Ilgiz Mustafin
  • 414
  • 1
  • 4
  • 15

1 Answers1

2

Yes, you can terminate the program returning the exit code n with

{EXCEPTIONS}.die (n)

If you are using an older version of the compiler/libraries where the code above does not compile, the same can be achieved with

;(create {EXCEPTIONS}).die (n)
Alexander Kogtenkov
  • 5,770
  • 1
  • 27
  • 35