select. Selecting entries

^table.select(selection_criterion)
^table.select(selection_criterion)[
options]   [3.4.1]

The method looks through the table row by row, examining each row in respect to the specified
criterion (a mathematical expression). The rows which satisfy the criterion (returned Boolean value is "true") are collected into the table with the same structure as that of the original table.

One can also specify a number of options, see "Copying and search options".

Example
$men[^table::create{name   age
Stephen   26
Alex   20
Michael   29
}]
$thoseAbove20[^men.select($men.
age > 20)]

Variable
$thoseAbove20 will contain table made up of rows with Stephen and Michael.


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