Whenever a function expects a function parameter for table columns, the following types are supported:
Type | Description | Example |
---|---|---|
Numeral | Specifies a table column number, beginning with 0. Negative indexing is allowed, i.e. -1 is last column in the top row, counting leftward. | 0 (left most column) -2 (2nd. last column) |
Quoted string | The content of the entire string is interpreted as one header name, even if it contains numbers. Empty strings ("") refer to the first column with blank header name. | "Last,First Name" refers to one header name "" is a blank header name |
Softquoted string | The content of the entire string is interpreted as one header name, even if it contains numbers. Empty strings ('') refer to the first column with blank header name. shifted table column specifications are allowed here to reference neighboring columns. Two consecutive points ('..') define column ranges in order to cover multiple consecutive columns Some function-specific exceptions may apply and are explicitly documented in the function library documentation. | 'Last,First Name' refers to one header name '' is a blank header name |
Set | Sets contain a collection of header names and/or column numbers | { 1, Last Name, first Name, "Value [EUR]" } |
'..' provided as softquoted string defines a range covering multiple columns in a from..to approach.
Items to watch out for.
table initialize( t, {{ Red, Orange, Yellow, Green, Turquoise, Blue, Purple, Brown, Black, ".." },
{ Rot, Orange, Gelb, Grün, Türkis, Blau, Purpur, Braun, Schwarz, Joker}} );
echo( table read row( t, { Green, Red }, 1 ) );
echo( table read row( t, { Yellow, '..', Blue }, 1 ) );
echo( table read row( t, { '..' }, 1 ) ); // Reads all columns
echo( table read row( t, { ".." }, 1 ) ); // Reads the column named "..", returning Joker only
echo( table read row( t, { Yellow, '..' }, 1 ) );
echo( table read row( t, { '..', Green }, 1 ) );
echo( table read row( t, { Brown, '..', Green }, 1 ) ); // Returns empty set because Brown lies past Green.
echo( table read row( t, { Yellow, '..', Blue, Brown, '..', Green }, 1 ) );
{'Grün','Rot'}
{'Gelb','Grün','Türkis','Blau'}
{'Rot','Orange','Gelb','Grün','Türkis','Blau','Purpur','Braun','Schwarz','Joker'}
{'Joker'}
{'Gelb','Grün','Türkis','Blau','Purpur','Braun','Schwarz','Joker'}
{'Rot','Orange','Gelb','Grün'}
{}
{'Gelb','Grün','Türkis','Blau'}
Addtional function-specific rules may apply depending on the function called and are documented accordingly. Below are some examples:
Note: If Table headers contain numbers, then you can find these headers by specifying the numbers as strings, e.g. '10', or { ..., '10'. ...}.