Map and Table Calculation

TBLCOLS( ) function

Returns the number of columns in a table.

Syntax

TBLCOLS(Table)

Input

Table is a table or any other object which is stored as a table, e.g. histograms, two-dimensional tables, a georef tiepoints, a segment map, a point map, a representation class

Output

TBLCOLS returns: a value
Domain: system domain Value

Note:

By default, this function works on tables with extension .tbt; you can omit the extension .tbt. To use this function on other objects, you need to specify the object's extension.

Tips:

Usable in

Simple calculators, MapCalc, TabCalc

Examples

Pocket line calculator examples:

? TBLCOLS(InTable)

returns the total number of columns in table InTable, e.g. 4

? TBLCOLS(Point.mpp)

returns the total number of columns in the table of point map Point.mpp, e.g. 7

TabCalc example:

OutCol = TBLCOLS(InTable)

 

InTable

InCol1

InCol2

InCol3

InCol4

OutCol

10

35

20

35

4

35

20

35

15

4

20

35

15

40

4

35

15

40

?

4

15

40

?

40

4

40

?

40

30

4

?

40

30

10

4

40

30

10

35

4

30

10

35

20

4

MapCalc example:

OutMap = InMap * TBLCOLS(InTable)

 

InMap

OutMap

10 35 20
35 15 40
? 40 30
40 140 80
140 60 160
? 160 120

See also:

MAPMAX PIXSIZE
MAPMIN PIXAREA
MAPROWS TBLRECS
MAPCOLS TBLVALUE