slot_subfield
Behaviour
Section titled “Behaviour”- Look up the object in slot
parent_slot - Retrieve the sub-object at
field_id - Place sub-object into the slot
new_slotor the next available slot ifnew_slotis 0. - Return the new slot number.
- Creates a subfield in the specified parent slot.
- Returns an error code or the result of the subfield creation.
Definition
Section titled “Definition”int64_t slot_subfield ( uint32_t parent_slot, uint32_t field_id, uint32_t new_slot);function slot_subfield( parent_slotno: number, field_id: number, new_slotno: number ): ErrorCode | numberExample
Section titled “Example”int64_t amt_slot = slot_subfield(oslot, sfAmount, 0);const amt_slot = slot_subfield(oslot, sfAmount, 0)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| parent_slot | uint32_t | Slot the parent object is in |
| field_id | uint32_t | The |
| new_slot | uint32_t | New slot number to place the object from the selected field into. If null, choose the next available slot. May be null. |
| Name | Type | Description |
|---|---|---|
| parent_slotno | number | The parent slot number. |
| field_id | number | The ID of the field to create a subfield for. |
| new_slotno | number | The new slot number for the subfield. |
Return Code
Section titled “Return Code”| Type | Description |
|---|---|
| int64_t | The slot number of the newly allocated object |
| Type | Description |
|---|---|
| number or ErrorCode | Returns an error code or the result of the subfield creation. |