Skip to content
Home ยป queue

queue

LotusScript Stack data structure

The stack data structure is a collection of items that supports “last in, first out” access. You have two operations: “Push” an item onto the stack, and “Pop” to retrieve and remove the most recently added item. It’s like the stack of plates in a buffet restaurant, where unless you’re a rule-breaking savage, you can only take the plate on top, which was added last. Compare to a queue, where when you get a value from it, you’re getting the oldest thing it contains. A stack is used by the system to hold local variables and your position in the code when making multiple levels of calls in a program. Variables defined in the current module are at the top of the stack, then when you exit the module you “pop” that off, discarding it,… Read More »LotusScript Stack data structure