Exit program in Eiffel

91 Views Asked by At

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.

1

There are 1 best solutions below

0
Alexander Kogtenkov On BEST ANSWER

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)