Difference between revisions of "Textutils.tabulate"
From ComputerCraft Wiki
Bomb Bloke (Talk | contribs) m (Formatted example output to reflect actual spacing.) |
|||
Line 3: | Line 3: | ||
|name=textutils.tabulate | |name=textutils.tabulate | ||
|args= [[table (type)|table]] table1, [[table (type)|table]] table2, ... | |args= [[table (type)|table]] table1, [[table (type)|table]] table2, ... | ||
− | |returns= | + | |returns=Nothing. |
|api=textutils | |api=textutils | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
− | |desc=Prints tables in an ordered form. Each table is a row, | + | |desc=Prints tables in an ordered form. Each table is a row, each column's width is auto-adjusted for consistency between rows. If the data to print exceeds that which can fit on the display, unlike [[Textutils.pagedTabulate|textutils.pagedTabulate()]], this does not wait before scrolling excess text out the top. |
|examples= | |examples= | ||
{{Example | {{Example | ||
|desc=Prints two tables in an ordered form. | |desc=Prints two tables in an ordered form. | ||
|code=textutils.tabulate({1,2,3},{"A","B","C"}) | |code=textutils.tabulate({1,2,3},{"A","B","C"}) | ||
− | |output= | + | |output=Prints: |
− | 1.0 2.0 3.0 | + | 1.0 2.0 3.0 |
− | + | A B C | |
− | A | + | |
}} | }} | ||
}} | }} | ||
[[Category:API_Functions]] | [[Category:API_Functions]] |
Revision as of 13:10, 22 February 2014
Function textutils.tabulate | |
Prints tables in an ordered form. Each table is a row, each column's width is auto-adjusted for consistency between rows. If the data to print exceeds that which can fit on the display, unlike textutils.pagedTabulate(), this does not wait before scrolling excess text out the top. | |
Syntax | textutils.tabulate(table table1, table table2, ...) |
Returns | Nothing. |
Part of | ComputerCraft |
API | textutils |
Examples
Example | |
Prints two tables in an ordered form. | |
Code |
textutils.tabulate({1,2,3},{"A","B","C"}) |
Output | Prints:
1.0 2.0 3.0 A B C |