Starting stack |
function used |
resluting stack |
notes |
4:
3: 111
2: 200
1: 345 |
DUP |
4: 111
3: 200
2: 345
1: 345 | it dupplicate the first item of the stack |
4:
3: 111
2: 200
1: 345 |
DROP |
4:
3:
2: 111
1: 200 | it remove the first ietm. see CLEAR to remove all |
4:
3: 111
2: 200
1: 345 |
DUP2 |
5: 111
4: 200
3: 345
2: 200
1: 345 | very interresting to dup the 2 first item |
4:
3: 111
2: 200
1: 345 |
OVER |
4: 111
3: 200
2: 345
1: 200 | it copy the second item |
4:
3: 111
2: 200
1: 345 |
SWAP |
4:
3: 111
2: 345
1: 200 | it brind you the second item by swaping it with the first one |
4:
3: 111
2: 200
1: 345 |
ROT |
4:
3: 200
2: 345
1: 111 | it moves the 3 last items... |
Of course, there are other stack manipulation function like PICK, DEPTH, ROLLD... but at first stages you better focus on the one you have on this page.