equal
deleted
inserted
replaced
682 } |
682 } |
683 %}. |
683 %}. |
684 ^ self retry:#bitAnd: coercing:anInteger |
684 ^ self retry:#bitAnd: coercing:anInteger |
685 |
685 |
686 "(2r001010100 bitAnd:2r00001111) radixPrintStringRadix:2" |
686 "(2r001010100 bitAnd:2r00001111) radixPrintStringRadix:2" |
|
687 ! |
|
688 |
|
689 bitClear:anInteger |
|
690 "return the bitwise-and of the receiver and the complement of the argument, anInteger, |
|
691 returning the receiver with bits of the argument cleared." |
|
692 |
|
693 %{ /* NOCONTEXT */ |
|
694 |
|
695 /* anding the tags doesn't change it */ |
|
696 if (__isSmallInteger(anInteger)) { |
|
697 RETURN ( ((OBJ) (((INT)self & ~(INT)anInteger) | TAG_INT)) ); |
|
698 } |
|
699 %}. |
|
700 ^ self retry:#bitClear: coercing:anInteger |
|
701 |
|
702 " |
|
703 (2r001010100 bitClear:2r00001111) radixPrintStringRadix:2 |
|
704 " |
687 ! |
705 ! |
688 |
706 |
689 bitAt:index |
707 bitAt:index |
690 "return the value of the index's bit (index starts at 1). |
708 "return the value of the index's bit (index starts at 1). |
691 Notice: the result of bitAt: on negative receivers is not |
709 Notice: the result of bitAt: on negative receivers is not |
2624 ! ! |
2642 ! ! |
2625 |
2643 |
2626 !SmallInteger class methodsFor:'documentation'! |
2644 !SmallInteger class methodsFor:'documentation'! |
2627 |
2645 |
2628 version |
2646 version |
2629 ^ '$Header: /cvs/stx/stx/libbasic/Attic/SmallInt.st,v 1.91 1997-12-19 08:38:23 stefan Exp $' |
2647 ^ '$Header: /cvs/stx/stx/libbasic/Attic/SmallInt.st,v 1.92 1998-01-12 13:15:14 cg Exp $' |
2630 ! ! |
2648 ! ! |