User Tools

Site Tools


crpl:docs:lte

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
crpl:docs:lte [2013/01/18 01:05] grauniadcrpl:docs:lte [2021/02/05 11:43] (current) – Rmoved discussion tag Karsten75
Line 1: Line 1:
-~~DISCUSSION~~+
 <- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#comparators|Comparators]] <- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#comparators|Comparators]]
 =====  lte  ===== =====  lte  =====
Line 10: Line 10:
 Top two items are popped from the stack and 'Less Than or Equal' comparison is performed.  Top two items are popped from the stack and 'Less Than or Equal' comparison is performed. 
 0 or 1 is pushed back to the stack where 1 indicates true. 0 or 1 is pushed back to the stack where 1 indicates true.
 +
 +See [[crpl:docs:eq#comparing_unlike_types|programming note]] for comparing unlike types
 +
 === Examples === === Examples ===
 <code> <code>
 # Compares numbers to 50.  # Compares numbers to 50. 
 # Pointless, in programming, but here to illustrate a point.  # Pointless, in programming, but here to illustrate a point. 
-100 50 lte # False, 100 is not less than 50  +100 50 lte # False, 100 is more than 50  
-45 50 lte #True 45 is less than 50  +45 50 lte # True45 is less than 50  
-50 50 let  # true, 50 is equal to 50+50 50 lte  # true, 50 is equal to 50
 </code>  </code> 
  
 +<code>
 +A B lte
 +If A is less than B, TRUE
 +If A is the same as B, TRUE
 +Otherwise FALSE
 +</code> 
crpl/docs/lte.1358489107.txt.gz · Last modified: 2014/10/01 15:02 (external edit)