slot_count

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

C

int64_t slot_count (
    uint32_t slot_no
);

Example

C

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

Parameters

Name
Type
Description

slot_no

uint32_t

The slot number

Return Code

Type
Description

int64_t

The 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

Last updated