Skip to content

Item_Count - Array

Returns the number of items in an array object

Type: Property
Access: Read/Write
Data Type: Integer
Parameters: None

Syntax

Property Integer Item_Count
Access Type Syntax
Read Access: Get Item_Count to IntegerVariable
Write Access: Set Item_Count to IntegerVariable/Value

Description

Item_count returns the number of items in an array object. Arrays with no data (items have never been added or the array has been cleared) will return zero. The item_count property is often used as a loop counter to access each of the Array elements.

procedure Show_values
    integer iIndex iItemCount
    Handle hoArray
    move oMyArray to hoArray
    get item_count of hoArray to iItemCount
    For iIndex from 0 to (iItemCount-1) 
        Get value of hoArray iIndex to sValue
        showln 'Array element=' iIndex '  value = ' sValue
    Loop
end_procedure

See Also

value