Log In  


Cart #knutil_tbfill-0 | 2022-09-12 | Code ▽ | Embed ▽ | No License
1

Feature Overview

TBFILL() Create a table by specifying an index number.

  • Create the table with the specified minimum and maximum indices and fill it with the value of the first argument.
  • Multi-dimensional tables can be created by adding minimum and maximum arguments.
  • This function consumes 30 Token.
-- one-dimensional table 
t=tbfill('yes',1,3)
?t[1]..' '..t[2]..' '..t[3].."\n\n"

-- two-dimensional table
t=tbfill('yes',1,2,1,3)
t[2][2]='no'
?t[1][1]..' '..t[1][2]..' '..t[1][3]
?t[2][1]..' '..t[2][2]..' '..t[2][3]

This function is included in the KNUTIL library.

release note


v0.3

  • changed to specify elements for table start and end, variable length arguments supported

v0.2

  • defaults to 1 or specifies the start of the table

v0.1

  • first release
1



[Please log in to post a comment]