Difference between revisions of "Os.version"
From ComputerCraft Wiki
m (Updated references from "os" to "OS") |
(Add return type and example output) |
||
| Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=os.version | |name=os.version | ||
| − | |returns=the version of the operating system of the Computer | + | |returns=[[string (type)|string]] the version of the operating system of the Computer |
|api=OS | |api=OS | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
| Line 8: | Line 8: | ||
|examples= | |examples= | ||
{{Example | {{Example | ||
| − | |desc= | + | |desc=Prints the version of the Computer's OS |
|code=print( os.version() ) | |code=print( os.version() ) | ||
| + | |output=CraftOS 1.5 | ||
}} | }} | ||
}} | }} | ||
[[Category:Lua_Core_Functions]] | [[Category:Lua_Core_Functions]] | ||
Revision as of 19:57, 21 April 2013
| 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
| Prints the version of the Computer's OS | |
| Code |
print( os.version() ) |
| Output | CraftOS 1.5 |