[continue autosave] Learn Sporth
log in learn new browse

Stack Operations

Stack operations manipulate the stack in Sporth. At the moment, Sporth has a very small set of stack operations.

In order of usefulness, they are as follows:

dup: duplicates the item on the stack ( a dup -> a a)

swap: swaps the last two items on the stack ( a b swap -> b a )

rot: rotates the third-to-last item on the stack: ( a b c rot -> b c a )

Previous: The Stack | Back | Next: Gates and Triggers

Compile & play Stop audio