table process cells in columns, table process cells selected rows in columns
These functions are derivatives of table process cells() and table process cells selected rows() with the only difference that
an additiona function parameter specifies the columns to be processed. All other columns remain untouched. As an example, this
function is suitable for processing a table containing many columns with dates and you want to use one single statement to reschedule or
reformat all dates.
For this function, the enabled partial table specifications also includes referencing the current column number by simply specifying a '.' (point)
and you can use the function col() to retrieve the current column number.
This feature allows simple formulation of instructions without writinng a 2-dimensional loop.
The closest relative of this function is the combination of for all table rows() and for all table selected columns() which describe two nested loops.
Note: The statements will be applied on all rows underneath the specified columns, even if some table rows are shorter than the column positions
used.
Indirect parameter passing is disabled
This function provides a table context for partial table specifications with table name, row number and column number for selected function parameters
3-5
No. | Type | Description |
---|---|---|
1. input |
string | Name of existing table |
2. input |
table columns | Header names and/or column numbers This parameter specifies the columns which shall be processed with the statements provided in the following parameter(s). All other columns remain unaffected.
Nothing will be executed if no columns are specified.
|
Opt. 3. code |
expression :string |
Expression to select rows Applicable to table process selected rows only: |
3. / 4. code |
statements :string |
Statements (applicable where rows are selected) table process cells: The statements provided will be executed for every row. |
5. code |
statements :string |
Statements (otherwise) table process cells: Not applicable. This function accepts 3 parameters only.
table process cells selected rows: The statements provided will be executed for every cell in every row where the condition calculated for that row returned false. |
Type | Description |
---|---|
numeral | Number of cells processed With table process selected rows, the number of selected rows (and processed with statements from 3rd function parameter) are counted. |
table initialize ( animals, { {Animal, Group, Special abilities},
{ parakeet, bird, can fly }, { moose, mammal }, { ape, mammal, quite samrt }, { sparrow, bird } , { trout, fish }, { bass, fish },
{ canary, bird }, { penguin, bird }, { beluga, mammal, submarine sonar} } );
table process cells in columns ( animals, { Group, Special abilities}, [.] += '!' ); // 2 named columns affected
table process cells selected rows in columns ( animals, [Group]=='mammal!', { 0, -1 }, [.] = +[.] ); // 1st and last column affected, mammals only
table list ( animals );
0 : Animal | Group | Special abilities
1 : parakeet | bird! | can fly!
2 : MOOSE | mammal! | !
3 : APE | mammal! | QUITE SAMRT!
4 : sparrow | bird! | !
5 : trout | fish! | !
6 : bass | fish! | !
7 : canary | bird! | !
8 : penguin | bird! | !
9 : BELUGA | mammal! | SUBMARINE SONAR!