Home > Net >  how to get out of an chosen programming language in CMD
how to get out of an chosen programming language in CMD

Time:06-03

im currently learning Lua and also learning how to work with CMD. i know how to change a directory path and run my codes and files from that path but what i dont know and im here to ask for is that how to get out of an programming language when you select it in CMD

for example to jump into the Lua you should type :

lua53 (--like phyton3 in python language) 

then you changed the CMD environment to a Lua compiler and cant access to CMD commands such as dir , cd , cls and the others. and everytime when i need to access these commands i have to close the CMD window and open a new one. now can you guys tell me am i able to access CMD commands while im selected Lua language? or i have to exit Lua first, and is there any Command to exit an programming language?

I hope I was able to convey my meaning to you. Thank You <3

CodePudding user response:

I'd recommend EOF (Ctrl D on Unix) rather than SIGKILL (Ctrl C) because some REPLs (node and python) choose to ignore the latter (perhaps because it's often used for copying text?); python will just print KeyboardInterrupt whereas node will only exit if you press Ctrl C twice (it will send a message telling you this the first time).

EOF (Ctrl D) on the other hand immediately exists all REPLs I have used so far.

The Lua REPL stops immediately when it receives either EOF or SIGKILL, so you can use both here.

Edit: As Sowban points out, EOF apparently is entered as Ctrl Z then Enter in powershell.

CodePudding user response:

You could type ctrl c to exit the process that's running generally.

  • Related