Difference between revisions of "Os.shutdown"

From ComputerCraft Wiki
Jump to: navigation, search
m (Someone dun bungled the example... no idea how.)
m (Fixed/Expanded)
 
Line 2: Line 2:
 
{{Function
 
{{Function
 
|name=os.shutdown
 
|name=os.shutdown
|returns=None
+
|returns={{type|nil}}
 
|api=OS
 
|api=OS
 
|addon=ComputerCraft
 
|addon=ComputerCraft
|desc=Shuts down the computer
+
|desc=Turns off the [[Computer]], [[Turtle]] or [[Pocket Computer]].
 
|examples=
 
|examples=
 
{{Example
 
{{Example
|desc=Shut down the computer
+
|desc=Shutdowns the computer.
|code=os.shutdown()
+
|code='''os.shutdown()'''
|output=The computer powers off.
+
 
}}
 
}}
 
|notes=
 
|notes=
Alternatively, you could hold {{Keypress|key=CTRL}} + {{Keypress|key=S}} for one second to shutdown the [[Computer]] outside of a program.
+
Alternatively, you could hold {{Keypress|key=CTRL}} + {{Keypress|key=S}} for one second to shutdown the [[Computer]] outside of a program.
 
}}
 
}}
  
 
[[Category:Lua_Core_Functions]]
 
[[Category:Lua_Core_Functions]]

Latest revision as of 22:49, 3 June 2014


Grid Redstone.png  Function os.shutdown
Turns off the Computer, Turtle or Pocket Computer.
Syntax os.shutdown()
Returns nil
Part of ComputerCraft
API OS

Examples

Grid paper.png  Example
Shutdowns the computer.
Code
os.shutdown()

Additional Notes

Alternatively, you could hold CTRL + S for one second to shutdown the Computer outside of a program.