RosettaCodeData/Task/Logical-operations/Smalltalk/logical-operations-1.st
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

11 lines
318 B
Smalltalk

|test|
test := [ :a :b |
('%1 %2 %3 = %4' % { a. 'and'. b. (a & b) }) displayNl.
('%1 %2 %3 = %4' % { a. 'or'. b. (a | b) }) displayNl.
('%1 %2 = %3' % {'not'. a. (a not) }) displayNl
].
test value: true value: true.
test value: false value: false.
test value: true value: false.
test value: false value: true.