Difference between revisions of "Textutils.pagedTabulate"
From ComputerCraft Wiki
Bomb Bloke (Talk | contribs) (Created page with "{{lowercase}} {{Function |name=textutils.pagedTabulate |args= table table1, table table2, ... |returns=Nothing. |api=textutils |addon=Compute...") |
MKlegoman357 (Talk | contribs) (Updated/Improved) |
||
(One intermediate revision by one other user not shown) | |||
Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=textutils.pagedTabulate | |name=textutils.pagedTabulate | ||
− | |args= | + | |args={{type|table}} table/{{type|number}} color, {{type|table}} table2/{{type|number}} color2, ... |
− | + | ||
|api=textutils | |api=textutils | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
− | |desc=Prints tables in an ordered form. Each table is a row, each column's width is auto-adjusted for consistency between rows. Unlike [[ | + | |desc=Prints tables in an ordered form. Each table is a row, each column's width is auto-adjusted for consistency between rows. If it encounters a number instead of a table then sets the text color to it. Unlike [[textutils.tabulate]](), if scrolling is required in order to fit the whole of the output onto the display this function will throw up a "Press any key to continue" prompt at the bottom - each press will cause it to scroll down and write a single line more (before prompting again, if need be). |
|examples= | |examples= | ||
{{Example | {{Example | ||
− | |desc=Prints | + | |desc=Prints two tables in an ordered form. |
− | |code= | + | |code='''textutils.tabulate( [[colors_(API)|colors]].orange, {1,2,3}, [[colors_(API)|colors]].lightBlue, {"A","B","C"} )''' |
− | + | |output=Prints: | |
− | + | <span style="color:#F2B233">1.0 2.0 3.0</span> | |
− | |output=Prints | + | <span style="color:#99B2F2">A B C</span> |
+ | | ||
}} | }} | ||
}} | }} | ||
[[Category:API_Functions]] | [[Category:API_Functions]] |
Latest revision as of 21:00, 16 February 2015
Function textutils.pagedTabulate | |
Prints tables in an ordered form. Each table is a row, each column's width is auto-adjusted for consistency between rows. If it encounters a number instead of a table then sets the text color to it. Unlike textutils.tabulate(), if scrolling is required in order to fit the whole of the output onto the display this function will throw up a "Press any key to continue" prompt at the bottom - each press will cause it to scroll down and write a single line more (before prompting again, if need be). | |
Syntax | textutils.pagedTabulate(table table/number color, table table2/number color2, ...) |
Returns | nil |
Part of | ComputerCraft |
API | textutils |
Examples
Example | |
Prints two tables in an ordered form. | |
Code |
textutils.tabulate( colors.orange, {1,2,3}, colors.lightBlue, {"A","B","C"} ) |
Output | Prints:
1.0 2.0 3.0 A B C |