Difference between revisions of "Os.version"

From ComputerCraft Wiki
Jump to: navigation, search
(Created page with "{{lowercase}} {{Function |name=os.version |returns=the version of the operating system of the Computer |api=os |addon=ComputerCraft |desc=returns the operating system of the c...")
 
m (Fixed/Expanded)
 
(7 intermediate revisions by 6 users not shown)
Line 2: Line 2:
 
{{Function
 
{{Function
 
|name=os.version
 
|name=os.version
|returns=the version of the operating system of the Computer
+
|returns={{type|string}} the version of the operating system of the Computer
|api=os
+
|api=OS
 
|addon=ComputerCraft
 
|addon=ComputerCraft
|desc=returns the operating system of the computer this command is executed on.
+
|desc=Returns the version of the OS the computer is running.
 
|examples=
 
|examples=
 
{{Example
 
{{Example
|desc=prints the Computer OS
+
|desc=Prints the version of the Computer's OS (assuming you are running it on a [[Computer]]).
|code=term.write(os.version())
+
|code=[[print]]('''os.version()''')
 +
|output=CraftOS 1.6
 
}}
 
}}
 
}}
 
}}
 +
 +
[[Category:Lua_Core_Functions]]

Latest revision as of 22:34, 3 June 2014


Grid Redstone.png  Function os.version
Returns the version of the OS the computer is running.
Syntax os.version()
Returns string the version of the operating system of the Computer
Part of ComputerCraft
API OS

Examples

Grid paper.png  Example
Prints the version of the Computer's OS (assuming you are running it on a Computer).
Code
print(os.version())
Output CraftOS 1.6