Skip to content

Function (FC): Stack - v1.2

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.
TypeNameVersion
data typestackInstanceAttributesv1.1
enumerationEStackMethodv1.0
enumerationEStackStatusv1.0
ParameterDeclarationTypeDescription
methodInputIntMethod to be executed. EStackMethod
instanceInOutstackInstanceAttributesStack instance
dataInOutVariantArray of data of type <E>
bufferInOutVariantData buffer of type <E>
-ReturnIntReturn of status, EStackStatus