This function implements a Stack using an array to store the data.
The function supports push, pop, and peek operations, following the LIFO
(Last In, First Out) principle, where the last element added to the stack is the
first one to be processed.
- Task or event management in order of arrival.
- Implementation of scheduling or resource management algorithms.
- Any situation where elements need to be processed in the reverse order of their addition.
| Type | Name | Version |
|---|
data type | stackInstanceAttributes | v1.1 |
enumeration | EStackMethod | v1.0 |
enumeration | EStackStatus | v1.0 |
| Parameter | Declaration | Type | Description |
|---|
method | Input | Int | Method to be executed. EStackMethod |
instance | InOut | stackInstanceAttributes | Stack instance |
data | InOut | Variant | Array of data of type <E> |
buffer | InOut | Variant | Data buffer of type <E> |
| - | Return | Int | Return of status, EStackStatus |