Stack Operations¶
Beremiz provides various operations for manipulating the stack, allowing you to efficiently manage data during program execution.
Basic Operations¶
-
over: Duplicates the second item from the top of the stack.Example:
-
dup: Duplicates the top item of the stack.Example:
-
drop: Removes the top item from the stack.Example:
-
swap: Swaps the top two items on the stack.Example:
-
nil: Inserts a null value into the stack.Example:
-
dumpstack: Dumps the current stack trace for debugging purposes. This operation doesn't consume the stack.Example:
-
exit: Exits the program with an status code and a optional message.Example: