Search code examples
juliaexit

How to quit the entire program in Julia


How can I quit the entire program like this in Julia? (this is in Python):

import sys

def some_func():
   # do something
   sys.exit()

Thank you!


Solution

  • You do not need to import Base for exiting; you can just use exit:

    function some_func()
        # do something
        exit() # <- you can provide exit code if you want.
    end