table column numbers

Prev Next

Function Names

table column numbers

Description

This function returns the column numbers for the columns specified.

Call as: function

Restrictions

Indirect parameter passing is disabled

Parameter count

2

Parameters

No.TypeDescription
1
input
string Name of existing table

2
input
table column Header name or column number

See table columns as function parameters for general ruling for this parameter.

Return value

TypeDescription
set Column numbers

The returned set contains all column numbers of the columns specified in the 2nd function parameter.

Exceptions

Table not found
Columns not found

Examples

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 column numbers( t, { Red, Green, Black } ) );
echo( table column numbers( t, { 0, 3, -2 } ) );  // Same output
echo( table column numbers( t, { '..' } ) );  // All columns

Output

{0,3,8}
{0,3,8}
{0,1,2,3,4,5,6,7,8,9}
Try it yourself: Open LIB_Function_table_column_numbers.b4p in B4P_Examples.zip. Decompress before use.

See also

table column number