Difference between revisions of "Shell.exit"

From ComputerCraft Wiki
Jump to: navigation, search
m (Moved to CAT:APIFunctions)
m (Expanded)
Line 2: Line 2:
 
{{Function
 
{{Function
 
|name=shell.exit
 
|name=shell.exit
|returns=Text written on the screen
+
|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 current program (or shell if no program is open)
+
|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


Grid Redstone.png  Function shell.exit
Exits the current program (or shell if no program is open).
Syntax shell.exit()
Returns None
Part of ComputerCraft
API shell

Examples

Grid paper.png  Example
Exits the program.
Code
print("Prepare for program termination...")
sleep(3)
shell.exit()