for all table columns
for all table columns ( table name, reference row number, iterator value, iterator counter ) statement;
for all table columns ( table name, reference row number, iterator value, iterator counter ) {statements; }
The loops works through all columns in the table specified and executes the following statements specified.
Indirect parameter passing is disabled
This function provides a table context for partial table specifications with table name, row number and column number
1-4
No. | Type | Description |
---|---|---|
1 input |
string | table name Name of existing table |
Opt. 2 input |
numeral | reference row number Positive values must be between 0 and number of table rows minus 1.
|
Opt. 3 code |
variable :string |
iterator value This variable is updated by this function in order to provide the current value taken from the specified table column and referenced row. The interator value can also be referenced using partial table specifications [.], meaning specified row and current column from the table context. Here, the 'quoted string' rule specified above does not apply. |
Opt. 4 code |
variable :string |
iterator counter This variable is updated by this function in order to provide the current value taken from the specified table column and referenced row. The variable is always of type 'quoted string', even if containing numbers or dates. You need to convert the type by hand if needed. |
table initialize( animals,
{{ Name, Class, Number of Legs},
{ Dog, Mammal, 4 }, { Snake, Reptile, 0 }, { Human, Mammal, 2 }} );
for all table columns( animals, 2, value[], i[] )
{
echo( i[],". ", [i[],0], ": ", value[] );
}
echo; // You can also use the current column number known in the partial table context:
// [.] = Current table, column and row. [.,0] = Current table, column and row 0
// Also allowed: ['.'], ['<.'] where then 2nd one refers 1 column to the left.
for all table columns( animals, 2 ) // A bit simpler
{
echo( [.,0], ": ", [.] );
}
echo;
for all table columns( animals ) // Same output as above (row 0 assumed as default)
{
echo( [.], ": ", [.,2] );
}
0. Name: Snake
1. Class: Reptile
2. Number of Legs: 0
Name: Snake
Class: Reptile
Number of Legs: 0
Name: Snake
Class: Reptile
Number of Legs: 0
for all current table columns
for all table selected columns
for all current table selected columns