LISTCNT


9.0

 

The LISTCNT instruction retrieves the current object count for a specified COLLECTION. The instruction uses the following formats:

 

(1)

[label]

LISTCNT

{dest}{sep}{collection}

 

Where:

label

Optional. A Data Definition Label.

dest

Required. A previously defined Numeric Variable that receives the current object.

sep

Required. A comma or one of the following prepositions: BY, TO, OF, FROM, USING, WITH, IN, or INTO.

collection

Required. A COLLECTION object whose object count is being requested.

Flags Affected: OVER, ZERO

Note the following:

  1. The object count indicates the number of objects in a COLLECTION object at the root level. This means that a nested COLLECTION object within another COLLECTION counts as one (1) toward the total object count.

  2. The {dest} count is zero if the COLLECTION has not been created.

  3. The OVER flag is set TRUE if the value stored into the {dest} variable is truncated.

  4. The ZERO flag is set if the value stored into the {dest} variable is a zero value.

 

 

See Also: Example Code, Object Instructions

 



PL/B Language Reference INSERTITEM LISTDEL