Difference between revisions of "Shell.exit"
From ComputerCraft Wiki
m (Moved to CAT:APIFunctions) |
MKlegoman357 (Talk | contribs) m (Expanded) |
||
| Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=shell.exit | |name=shell.exit | ||
| − | |returns= | + | |returns=None |
|api=shell | |api=shell | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
| − | |desc=Exits the current program (or shell if no program is open) | + | |desc=Exits the current program (or shell if no program is open). |
|examples= | |examples= | ||
{{Example | {{Example | ||
| − | |desc=Exits the | + | |desc=Exits the program. |
| − | |code=shell.exit() | + | |code= [[print]]("Prepare for program termination...") |
| + | [[sleep]](3) | ||
| + | '''shell.exit()''' | ||
}} | }} | ||
}} | }} | ||
[[Category:API_Functions]] | [[Category:API_Functions]] | ||
Revision as of 17:47, 10 April 2014
| Exits the current program (or shell if no program is open). | |
| Syntax | shell.exit() |
| Returns | None |
| Part of | ComputerCraft |
| API | shell |
Examples
| Exits the program. | |
| Code |
print("Prepare for program termination...") sleep(3) shell.exit() |