|
|
|
|
|
- Operating mode for a multithread management
<Stack variable>.Pop (Function) In french: <Variable Pile>.Dépile Pops an element from a stack. The element found at the top of stack is deleted and returned in the specified variable.
New in version 2025MyStack is Stack of int // Push the values 1, 2 and 3 MyStack.Push(1) MyStack.Push(2) MyStack.Push(3) // Display the trace: 3, 2, 1 x is int WHILE MyStack.Pop(x) = True Trace(x) END
Syntax
Retrieving the element at the top of stack Hide the details
<Result> = <Stack>.Pop([<Element>])
<Result>: Boolean - True if the element was unstacked,
- False if the stack is empty.
<Stack>: Stack Name of the Stack variable to be used. <Element>: Type of elements handled by the stack, optional parameter Name of variable into which the value of the popped element is returned. If this parameter is not specified, the element is popped but its value is not retrieved. Remarks Operating mode for a multithread management If the stack is empty, <Stack variable>.Pop waits for an element to be added into the stack. The maximum timeout can be specified by the <Timeout> parameter. The function returns True if an element has been popped from the stack. Otherwise, it returns False if the timeout has been reached or if the AdditionCompleted property is set to True. The assignment of AdditionCompleted to True provokes the end of the timeout for all the pending threads. In this case, <Stack variable>.Pop returns False.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|