GetElemCount Method (VARIANT)


8.7, PLBCMP GUI Only

 

The GetElemCount method retrieves the element count for a specified VARIANT array dimension. The method uses the following format:

 

[label]

{object}.GetElemCount

[GIVING {return}] USING [*DimPos=]{dimpos}

 

Where:

label

Optional. A Program Execution Label.

object

Required. A VARIANT object that is accessed.

return

Optional. A Numeric Variable that receives the number of elements found in the dimension.

dimpos

Optional. A Numeric Variable that specifies the dimension for which the element count is retrieved.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. A value of zero is returned if there are no elements in the specified dimension.

  2. If the {dimpos} is not specified, the method retrieves the variant element count for the first dimension.

  3. If the value returned is zero, the ZERO Condition Flag is set.

  4. The OVER and EOS Condition Flags are always cleared.

 

 

See Also: Method Syntax, VARIANT Methods

 



PL/B Language Reference GetElement Method (VARIANT) PutElement Method (VARIANT)