User Tools

Site Tools


crpl:docs:and

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:and [2013/01/14 14:09] – external edit 127.0.0.1crpl:docs:and [2022/07/01 14:43] (current) – reformat Karsten75
Line 1: Line 1:
  
 +<- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#logical_operators|Logical Operators]]
 =====  and  ===== =====  and  =====
  
-^Arguments^Result^Notation^ +<-bool1 <-bool2 and ->boolResult
-|Two items on the stack|The conditional AND of the two arguments |''n1 n2 -- n3 ''+
  
 === Description === === Description ===
-Pops two items from the stacktreats them as boolean values, 'ands' themand pushes or 1 back to the stack.+Pops two items from the stack and treats them as TRUE/FALSE (0/1 or Boolean) values. If they are both TRUE1 is pushed to the stack. Otherwise, 0 is pushed to the stack.
 === Examples === === Examples ===
-<code>example goes here</code>  +<code 4RPL> 
 +TRUE TRUE and Trace     #prints out 1 (TRUE) to the tracelog 
 +TRUE FALSE and Trace    #prints out 0 (FALSE) to the tracelog 
 +FALSE TRUE and Trace    #prints out 0 (FALSE) to the tracelog 
 +FALSE FALSE and Trace   #prints out 0 (FALSE) to the tracelog</code> 
  
crpl/docs/and.1358190557.txt.gz · Last modified: 2014/10/01 15:02 (external edit)