User Tools

Site Tools


crpl:docs:neg

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
crpl:docs:neg [2014/10/01 15:02] – external edit 127.0.0.1crpl:docs:neg [2018/06/02 15:34] – Explained how it is = *-1 TDplay
Line 1: Line 1:
-~~DISCUSSION~~ 
 <- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#math_commands|Math Commands]] <- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#math_commands|Math Commands]]
 =====  neg  ===== =====  neg  =====
Line 8: Line 7:
  
 === Description === === Description ===
-Calculates the negative value of the item and pushes the result on the stack. +Calculates the negative value of the item and pushes the result on the stack. Is the same as multiplying by -1. 
-  5 ->a +
-  <-a <-a 2 mul sub <-a neg eq # Returns true+
 === Examples === === Examples ===
-<code>Converts 10 to -10 + 
-Converts 5 to -5 +<code> 
-Converts -18 to 18</code> +  5 ->a 
 +  <-a <-a 2 mul sub <-a neg eq # Returns true   
 +</code>  
 + 
 +<code> 
 +ClearTraceLog 
 +ShowTraceLog 
 +10 neg Trace #-10 
 +-5 neg Trace #
 +1.8 neg trace #-1.8 
 +</code> 
  
crpl/docs/neg.txt · Last modified: 2022/07/04 08:47 by Karsten75