Logical operations: Difference between revisions

Added APL
mNo edit summary
(Added APL)
Line 104:
 
end booleanOperations ;</lang>
 
=={{header|APL}}==
APL represents Boolean values using 1 and 0. This function takes Boolean arguments before it and after it—which may be arrays of Booleans—and returns an array consisting of arg1 AND arg2, arg1 OR arg2, NOT arg1, arg1 NAND arg2, arg1 NOR arg2, and arg1 XOR arg2, in that order.
<lang apl> LOGICALOPS←{(⍺∧⍵)(⍺∨⍵)(~⍺)(⍺⍲⍵)(⍺⍱⍵)(⍺≠⍵)}</lang>
 
=={{header|AutoHotkey}}==
519

edits