equal
deleted
inserted
replaced
3541 asBCD |
3541 asBCD |
3542 "return an integer which represents the BCD encoded value of the receiver; |
3542 "return an integer which represents the BCD encoded value of the receiver; |
3543 that is: each digit of its decimal representation is placed into a nibble |
3543 that is: each digit of its decimal representation is placed into a nibble |
3544 of the result. (aka 162 -> 0x162). |
3544 of the result. (aka 162 -> 0x162). |
3545 This conversion is useful for some communication protocols, |
3545 This conversion is useful for some communication protocols, |
3546 or control systems, which represent big numbers this way... |
3546 or control systems, which represent numbers this way... |
3547 This is not particularily tuned or optimized for speed." |
3547 This fallback code is not particularily tuned or optimized for speed." |
3548 |
3548 |
3549 |rest twoDigits hi lo shift out| |
3549 |rest twoDigits hi lo shift out| |
3550 |
3550 |
3551 out := 0. shift := 0. |
3551 out := 0. shift := 0. |
3552 rest := self. |
3552 rest := self. |
5040 ! ! |
5040 ! ! |
5041 |
5041 |
5042 !Integer class methodsFor:'documentation'! |
5042 !Integer class methodsFor:'documentation'! |
5043 |
5043 |
5044 version |
5044 version |
5045 ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.294 2014-02-14 16:15:47 cg Exp $' |
5045 ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.295 2014-02-14 16:23:00 cg Exp $' |
5046 ! |
5046 ! |
5047 |
5047 |
5048 version_CVS |
5048 version_CVS |
5049 ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.294 2014-02-14 16:15:47 cg Exp $' |
5049 ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.295 2014-02-14 16:23:00 cg Exp $' |
5050 ! ! |
5050 ! ! |
5051 |
5051 |
5052 |
5052 |
5053 Integer initialize! |
5053 Integer initialize! |