How do you cleanly exit interactive Lua?

James Bedford picture James Bedford · Feb 10, 2011 · Viewed 19.1k times · Source

I've tried to the word "quit" on a single line but this seems to simply change the command line pointer from a ">" to a ">>". What's the best way to end a session in interactive Lua please?

Answer

lhf picture lhf · Feb 10, 2011

There is no quit keyword. Try control-D in Unix, control-Z in Windows or os.exit() if you must.