Count the elements of an array object in a slot

Behaviour

  • Count the elements of an array in the specified slot
  • Return the count

Definition

int64_t slot_count (
    uint32_t slot_no
);

Example

slot_count(1); // assumes an array is slotted into slot=1

Parameters

NameTypeDescription
slot_nouint32_tThe slot number

Return Code

TypeDescription
int64_tThe number of elements inside the slotted array

If negative, an error:
DOESNT_EXIST
- the specified slot does not contain any object or it is an invalid slot

NOT_AN_ARRAY
- the specified slot does not contain an array object