count. Number of rows in table

^table.count[]
^table.count[columns|cells|rows]
   [3.4.2]

When calling without parameters (or with parameter
rows) returns the number of rows in the table (int).
When calling with parameter
columns returns the number of columns in the table (int).
When calling with parameter
cells returns the number of cells in the current row of the table (int).

Example
$goods[^table::create{pos   good   price
1   Monitor display   1000
2   
System control unit   1500
3   
Keyboard   150
4   Speakers   100
}]
Columns: ^goods.count[columns]
Rows^goods.count[]

The example will output:
Columns: 3
Rows4

In expressions, the numeric value of the table equals the amount of its rows:

^if($goods > 2){more}


Copyright © 1997–2021 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 24.03.2016