User Tools

Site Tools


crpl:docs:dup2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
crpl:docs:dup2 [2013/01/14 14:02] – created virgilwcrpl:docs:dup2 [2021/02/05 11:43] (current) – Rmoved discussion tag Karsten75
Line 1: Line 1:
-TODO+ 
 +<- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#stack_manipulation|Stack Manipulation]] 
 +=====  dup2  ===== 
 + 
 +^Arguments^Result^Notation^ 
 +|Two items on the stack|A duplicate of the two original items |''n1 n2 -- n1 n2 n1 n2 ''
 + 
 + 
 +=== Description === 
 +Duplicates the top two items currently on the stack without removing the original pair. 
 +=== Examples === 
 +<code> 
 +# 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 
 +</code>  
crpl/docs/dup2.1358190127.txt.gz · Last modified: 2014/10/01 15:02 (external edit)