Difference between revisions of "Help.topics"
From ComputerCraft Wiki
(Table -> Table (type)) |
(Update description, reformat example and use ipairs to get sorted output, and use type template) |
||
| Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=help.topics | |name=help.topics | ||
| − | |||
|api=help | |api=help | ||
| − | |returns= | + | |returns={{Type|table}} all valid topics |
|addon=ComputerCraft | |addon=ComputerCraft | ||
| − | |desc= | + | |desc=Returns a list of all available help topics. This is all files found in the directories in the search path returned by [[help.path]]. The returned table is sorted. |
|examples= | |examples= | ||
{{Example | {{Example | ||
| − | |desc=Lists all valid help topics | + | |desc=Lists all valid help topics. |
| − | |code=for | + | |code=for _, v in ipairs(help.topics()) do |
| + | print(v) | ||
| + | end | ||
|output=List of all valid help topics | |output=List of all valid help topics | ||
}} | }} | ||
Revision as of 19:53, 23 April 2013
| Returns a list of all available help topics. This is all files found in the directories in the search path returned by help.path. The returned table is sorted. | |
| Syntax | help.topics() |
| Returns | table all valid topics |
| Part of | ComputerCraft |
| API | help |
Examples
| Lists all valid help topics. | |
| Code |
for _, v in ipairs(help.topics()) do print(v) end |
| Output | List of all valid help topics |