DTwainRange::Count

Top  Previous  Next

Syntax

long Count( ) const;

 

Return Value

If successful, returns the number of values defined by the range.  If unsuccessful, 0 is returned.

 

Comments

The DTwainRange::Count function gets the number of items that the DTwainRange defines.  The upper and lower bounds, and step size values defined are used to compute the number of values.  For example if the DTwainRange has the following characteristics:

 

Minimum Value = -10

Maximum Value = 10

Step size = 2

 

The total number of values that will be returned by Count( ) will be 11, since the range encompasses the following values:

 

-10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10

 

There are 11 values defined by the range (-10, 10) with a step of 2.

 

This function can be used to get the number of values that will be generated when the DTwainRange::Expand function is called.