slot_count
Behaviour
Section titled “Behaviour”- Count the elements of an array in the specified slot
- Return the count
Definition
Section titled “Definition”int64_t slot_count ( uint32_t slot_no);
function slot_count(slotno: number): ErrorCode | number
Example
Section titled “Example”slot_count(1); // assumes an array is slotted into slot=1
slot_count(1) // assumes an array is slotted into slot=1
Parameters
Section titled “Parameters”Name | Type | Description |
---|---|---|
slot_no | uint32_t | The slot number |
Name | Type | Description |
---|---|---|
slotno | number | The slot number |
Return Code
Section titled “Return Code”Type | Description |
---|---|
int64_t | The number of elements inside the slotted array |
Type | Description |
---|---|
ErrorCode or number | Returns an error code or the count of entries. |