Logical operations: Difference between revisions
Content deleted Content added
added OpenEdge solution |
No edit summary |
||
Line 1: | Line 1: | ||
{{task|Basic Data Operations}} |
{{task|Basic Data Operations}} |
||
{{basic data operation}} |
{{basic data operation}}http://rosettacode.org/mw/index.php?title=Logical_operations&action=edit |
||
Write a function that takes two logical (boolean) values, and outputs the result of "and" and "or" on both arguments as well as "not" on the first arguments. If the programming language doesn't provide a separate type for logical values, use the type most commonly used for that purpose. |
Write a function that takes two logical (boolean) values, and outputs the result of "and" and "or" on both arguments as well as "not" on the first arguments. If the programming language doesn't provide a separate type for logical values, use the type most commonly used for that purpose. |
||
Line 27: | Line 27: | ||
} |
} |
||
</lang> |
</lang> |
||
=={{header|Aime}}== |
|||
<lang aime>void |
|||
out(integer a, integer b) |
|||
{ |
|||
o_integer(a && b); |
|||
o_byte('\n'); |
|||
o_integer(a || b); |
|||
o_byte('\n'); |
|||
o_integer(!a); |
|||
o_byte('\n'); |
|||
}</lang> |
|||
=={{header|ALGOL 68}}== |
=={{header|ALGOL 68}}== |