Next: Floating point stack, Previous: Stack Manipulation, Up: Stack Manipulation [Contents][Index]
drop ( w – ) core “drop”
drop
nip ( w1 w2 – w2 ) core-ext “nip”
nip
dup ( w – w w ) core “dupe”
dup
over ( w1 w2 – w1 w2 w1 ) core “over”
over
third ( w1 w2 w3 – w1 w2 w3 w1 ) gforth-1.0 “third”
third
fourth ( w1 w2 w3 w4 – w1 w2 w3 w4 w1 ) gforth-1.0 “fourth”
fourth
swap ( w1 w2 – w2 w1 ) core “swap”
swap
rot ( w1 w2 w3 – w2 w3 w1 ) core “rote”
rot
-rot ( w1 w2 w3 – w3 w1 w2 ) gforth-0.2 “not-rote”
-rot
tuck ( w1 w2 – w2 w1 w2 ) core-ext “tuck”
tuck
pick ( S:... u – S:... w ) core-ext “pick”
pick
Actually the stack effect is x0 ... xu u -- x0 ... xu x0 .
x0 ... xu u -- x0 ... xu x0
roll ( x0 x1 .. xn n – x1 .. xn x0 ) core-ext
roll
?dup ( w – S:... w ) core “question-dupe”
?dup
Actually the stack effect is: ( 0 -- 0 | x\0 -- x x ). It performs a dup if x is nonzero.
( 0 -- 0 | x\0 -- x x )
2drop ( w1 w2 – ) core “two-drop”
2drop
2nip ( w1 w2 w3 w4 – w3 w4 ) gforth-0.2 “two-nip”
2nip
2dup ( w1 w2 – w1 w2 w1 w2 ) core “two-dupe”
2dup
2over ( w1 w2 w3 w4 – w1 w2 w3 w4 w1 w2 ) core “two-over”
2over
2swap ( w1 w2 w3 w4 – w3 w4 w1 w2 ) core “two-swap”
2swap
2rot ( w1 w2 w3 w4 w5 w6 – w3 w4 w5 w6 w1 w2 ) double-ext “two-rote”
2rot
2tuck ( w1 w2 w3 w4 – w3 w4 w1 w2 w3 w4 ) gforth-0.2 “two-tuck”
2tuck