equal
deleted
inserted
replaced
579 RETURN (self); |
579 RETURN (self); |
580 } |
580 } |
581 if (val != _MIN_INT) { |
581 if (val != _MIN_INT) { |
582 RETURN ( __MKSMALLINT(-val) ); |
582 RETURN ( __MKSMALLINT(-val) ); |
583 } |
583 } |
584 %}. |
584 /* only reached for minVal */ |
585 "only reached for minVal" |
585 RETURN( __MKLARGEINT(-_MIN_INT)); |
586 ^ self negated |
586 %}. |
|
587 "/ "only reached for minVal" |
|
588 "/ ^ self negated |
587 ! |
589 ! |
588 |
590 |
589 negated |
591 negated |
590 "return the negative value of the receiver |
592 "return the negative value of the receiver |
591 reimplemented here for speed" |
593 reimplemented here for speed" |
595 INT val = __intVal(self); |
597 INT val = __intVal(self); |
596 |
598 |
597 if (val != _MIN_INT) { |
599 if (val != _MIN_INT) { |
598 RETURN ( __MKSMALLINT(- val) ); |
600 RETURN ( __MKSMALLINT(- val) ); |
599 } |
601 } |
600 %}. |
602 /* only reached for minVal */ |
601 "only reached for minVal" |
603 RETURN (__MKLARGEINT( -_MIN_INT)); |
602 ^ (LargeInteger value:(SmallInteger maxVal)) + 1 |
604 %}. |
|
605 "/ "only reached for minVal" |
|
606 "/ ^ (LargeInteger value:(SmallInteger maxVal)) + 1 |
603 ! |
607 ! |
604 |
608 |
605 quo:aNumber |
609 quo:aNumber |
606 "return the integer part of the quotient of the receivers value |
610 "return the integer part of the quotient of the receivers value |
607 and the arguments value. The result is truncated towards zero |
611 and the arguments value. The result is truncated towards zero |
2647 ! ! |
2651 ! ! |
2648 |
2652 |
2649 !SmallInteger class methodsFor:'documentation'! |
2653 !SmallInteger class methodsFor:'documentation'! |
2650 |
2654 |
2651 version |
2655 version |
2652 ^ '$Header: /cvs/stx/stx/libbasic/Attic/SmallInt.st,v 1.93 1998-01-20 18:04:51 stefan Exp $' |
2656 ^ '$Header: /cvs/stx/stx/libbasic/Attic/SmallInt.st,v 1.94 1998-05-08 13:06:46 cg Exp $' |
2653 ! ! |
2657 ! ! |