Cancel
Showing results for 
Search instead for 
Did you mean: 

Method to count the quantity of cells full in a row of a tablefile

Builder
Builder

is there a way to count the quantity of of cells full in a row of a tablefile?

3 REPLIES

Re: Method to count the quantity of cells full in a row of a tablefile

Phenom
Phenom

yes, s. below

 

var T :object :=tabelle

var row :integer
var colCount :integer

row:=1

colCount:=0

for var i:=1 to T.xdim loop
	if T[i,row]/= void then
		colcount+=1
		end
next

print "column count=",colCount

Re: Method to count the quantity of cells full in a row of a tablefile

Builder
Builder

is there another way to do that without using the loop for?

Cause depending of the quantity of information recorded in the table, using the loop for may compromise the processing performance.

Re: Method to count the quantity of cells full in a row of a tablefile

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
try this:

<table>.determineRange
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net