Feature Overview
TTABLE() returns the table if the argument is a table.
- Returns FALSE if not a table.
- Use when table or string determination is required.
- e.g., when using a string for initialization and replacing it with a table
- Simultaneously check the type and reference the contents inline, as in
type(tbl)=='table' and tbl
.
- This function consumes 10 Token.
tbl = '1 5 10' -- Default value. tbl = ttable(tbl) or split(tbl, ' ') -- tbl = {1, 5, 10} ---- ---- -- Thereafter, the tbl is not initialized even if there are changes to the elements of the tbl. tbl = ttable(tbl) or split(tbl, ' ') |
This function is included in the KNUTIL library.
release note
[Please log in to post a comment]