User Tools

Site Tools


4rpl:commands:eq

Differences

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

Link to this comparison view

Next revision
Previous revision
4rpl:commands:eq [2021/01/08 16:01] – external edit 127.0.0.14rpl:commands:eq [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ~~NOTOC~~ ~~NOTOC~~
-<=[[4rpl:start| Index]]+<=[[4rpl:start| Index]] \\ 
 +<=[[4rpl:start#compatators| Comparators]] 
  
 ====== eq ====== ====== eq ======
Line 6: Line 8:
  
 ===== Description ===== ===== Description =====
-Top two items are popped from the stack and compared for equality. 0 or 1 is pushed back to the stack where 1 indicates equal and 0 (zero) ndicates not equal+Two items are popped from the stack and compared for equality. 0 or 1 is pushed back to the stack where 1 indicates equal and 0 (zero) indicates not equal. \\ 
 +The equal/not equal evaluation can also be performed with “true” (1) and false(0), respectively. \\ 
 + 
 +  * If either item being compared is a float, a float comparison is performed.\\ 
 +  * If both items being compared are strings, a string comparison is performed.\\ 
 +  * If both items being compared are vectors, a vector comparison is performed.\\ 
 +  * If one item is a float and one item is a vector, the float is compared to the vector length.\\ 
 +  * If none of the above conditions are true, an integer comparison is performed.
  
-the equal/not equal evaluation can also be performed with “true” (1) and false(0), respectively.+Note: See [[4rpl:Data Types]] for comparison between dissimilar types and type conversion
  
 ===== Examples ===== ===== Examples =====
4rpl/commands/eq.1610121708.txt.gz · Last modified: 2025/02/14 14:56 (external edit)