Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you cleanly exit interactive Lua?

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?

like image 894
James Bedford Avatar asked Feb 10 '11 19:02

James Bedford


People also ask

How do I end a Lua code?

In Lua, break statement enables us to come out of the inner block of a code. Break statement is used to end the loop. The break statement breaks the for, while, or repeat loop which includes the break statement. After the break loop, the code runs after the break statement and the broken loop.

How do I open Lua console?

The Console Display is a powerful tool that allows you to run Lua scripts within the system:inmation environment, without having to create an object to hold the script (for example an ActionItem or Generic Item). To open a Console display, go to the Open menu and select Open Console (shortcut Ctrl + Shift + U ).

How do I get command line arguments in Lua?

To pass arguments into Lua, the script name and arguments must be enclosed within double quotes. The arguments are stored within the arg variable in Lua, which is a table of strings.


1 Answers

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

like image 58
lhf Avatar answered Sep 21 '22 01:09

lhf