Integer.st
changeset 14043 045fd447ab4d
parent 13993 14b7b1edf4b5
child 14097 d8fc9697dd23
equal deleted inserted replaced
14042:05b7b61d7e59 14043:045fd447ab4d
  2377     "return a ShortFloat with same value as receiver"
  2377     "return a ShortFloat with same value as receiver"
  2378 
  2378 
  2379     ^ ShortFloat fromInteger:self
  2379     ^ ShortFloat fromInteger:self
  2380 !
  2380 !
  2381 
  2381 
       
  2382 signExtended24BitValue
       
  2383     "return a smallInteger from sign-extending the 24'th bit.
       
  2384      May be useful for communication interfaces"
       
  2385 
       
  2386     ^ (self bitAnd:16rFFFFFF) signExtended24BitValue
       
  2387 
       
  2388     "Modified: / 07-05-1996 / 09:31:57 / cg"
       
  2389     "Created: / 05-03-2012 / 14:37:55 / cg"
       
  2390 !
       
  2391 
  2382 signExtendedByteValue
  2392 signExtendedByteValue
  2383     "return a smallInteger from sign-extending the 8'th bit.
  2393     "return a smallInteger from sign-extending the 8'th bit.
  2384      May be useful for communication interfaces"
  2394      May be useful for communication interfaces"
  2385 
  2395 
  2386     ^ (self bitAnd:16rFF) signExtendedByteValue
  2396     ^ (self bitAnd:16rFF) signExtendedByteValue
  4777 ! !
  4787 ! !
  4778 
  4788 
  4779 !Integer class methodsFor:'documentation'!
  4789 !Integer class methodsFor:'documentation'!
  4780 
  4790 
  4781 version
  4791 version
  4782     ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.261 2012-01-31 11:18:30 cg Exp $'
  4792     ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.262 2012-03-05 13:38:14 cg Exp $'
  4783 !
  4793 !
  4784 
  4794 
  4785 version_CVS
  4795 version_CVS
  4786     ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.261 2012-01-31 11:18:30 cg Exp $'
  4796     ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.262 2012-03-05 13:38:14 cg Exp $'
  4787 ! !
  4797 ! !
  4788 
  4798 
  4789 Integer initialize!
  4799 Integer initialize!