table row width
This table returns the width of a specific table row.
If a table context for partial table specifications is available, then the current table name and optionally current row number can be used as default values.
Indirect parameter passing is disabled
0-2
No. | Type | Description |
---|---|---|
Opt. 1 input |
string | name of table Specify the table name Default value: If a __table context__ is available: current table name |
1 / 2 input |
numeral | row number Note that the first table row (header row) begins with row 0. Negative row numbers count from the bottom up. Example: -1 = last row. Default value: If a __table context__ is available: current table row |
Type | Description |
---|---|
numeral | Width Number of columns in the row |
Table not found
No context available for partial table specifications
row number is outside table boundaries
table initialize ( table 1,
{ { Animal, leg count, hair color }, { Worm, 0}, { Bird, 2, white, brown, yellow }, { Dog, 4 }, { Fly }, {}, { Tick, 8 } } );
echo("table 1:");
table list ( table 1 );
print( table row width( table 1, 1 ),", " ); // 2 (2nd row)
print( table row width( table 1 ), ", " ); // 3 (row 0)
echo ( table row width( table 1, -2 ) ); // 0 (2nd last row)
with table (table 1, 1)
{
print( table row width( 2 )); // 5 (Row 3)
echo( ", ", table row width( )); // 2 (Row 1)
}
table 1:
0 : Animal | leg count | hair color | |
1 : Worm | 0 | | |
2 : Bird | 2 | white | brown | yellow
3 : Dog | 4 | | |
4 : Fly | | | |
5 : | | | |
6 : Tick | 8 | | |
2, 3, 0
5, 2