RosettaCodeData/Task/Bitwise-operations/Objeck/bitwise-operations.objeck
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

17 lines
533 B
Text

use IO;
bundle Default {
class Test {
function : Main(args : String[]) ~ Nil {
BitWise(3, 4);
}
function : BitWise(a : Int, b : Int) ~ Nil {
Console->GetInstance()->Print("a and b: ")->PrintLine(a and b);
Console->GetInstance()->Print("a or b: ")->PrintLine(a or b);
Console->GetInstance()->Print("a xor b: ")->PrintLine(a xor b);
# shift left & right are supported by the compiler and VM but not
# exposed to end-users; those instructions are used for optimizations
}
}
}