This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| crpl:docs:dup2 [2013/01/14 19:02] – created virgilw | crpl:docs:dup2 [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | TODO | + | |
| + | <- [[crpl: | ||
| + | ===== dup2 ===== | ||
| + | |||
| + | ^Arguments^Result^Notation^ | ||
| + | |Two items on the stack|A duplicate of the two original items |'' | ||
| + | |||
| + | |||
| + | === Description === | ||
| + | Duplicates the top two items currently on the stack without removing the original pair. | ||
| + | === Examples === | ||
| + | < | ||
| + | # Create a set of 4 coordinates that define a square | ||
| + | # of 10 cells either way from the unit's current coordinates | ||
| + | CurrentCoords dup2 10 add swap 10 add swap | ||
| + | </ | ||