UninterpretedBytes.st
changeset 9185 283bfee8b9ab
parent 9005 b82aa6bdc487
child 9258 83c940f349ea
equal deleted inserted replaced
9184:d56887fab7ed 9185:283bfee8b9ab
   307 
   307 
   308     ^ self == UninterpretedBytes
   308     ^ self == UninterpretedBytes
   309 
   309 
   310     "Modified: / 23.4.1996 / 15:56:25 / cg"
   310     "Modified: / 23.4.1996 / 15:56:25 / cg"
   311     "Modified: / 5.3.1998 / 14:56:22 / stefan"
   311     "Modified: / 5.3.1998 / 14:56:22 / stefan"
       
   312 ! !
       
   313 
       
   314 !UninterpretedBytes methodsFor:'Compatibility-V''Age'!
       
   315 
       
   316 uint32At:zeroBasedIndex
       
   317     "return the 4-bytes starting at index as (unsigned) Integer.
       
   318      The index is a C index (i.e. 0-based).
       
   319      The value is retrieved in the machines natural byte order.
       
   320      Similar to unsignedLongAt:, except for the index base"
       
   321 
       
   322     ^ self unsignedLongAt:zeroBasedIndex+1
       
   323 
       
   324     "
       
   325      |b|
       
   326 
       
   327      b := ByteArray withAll:#(0 0 0 0).
       
   328      b uint32At:0 put:16r12345678.
       
   329      b uint32At:0.
       
   330      b
       
   331     "
       
   332 !
       
   333 
       
   334 uint32At:zeroBasedIndex put:anInteger
       
   335     "set the 4-bytes starting at index to the value given by (unsigned) Integer.
       
   336      The index is a C index (i.e. 0-based).
       
   337      The value is stored in the machines natural byte order.
       
   338      Similar to unsignedLongAt:put:, except for the index base"
       
   339 
       
   340     ^ self unsignedLongAt:zeroBasedIndex+1 put:anInteger
       
   341 
       
   342     "
       
   343      |b|
       
   344 
       
   345      b := ByteArray withAll:#(0 0 0 0).
       
   346      b uint32At:0 put:16r12345678.
       
   347      b
       
   348     "
   312 ! !
   349 ! !
   313 
   350 
   314 !UninterpretedBytes methodsFor:'accessing-bytes'!
   351 !UninterpretedBytes methodsFor:'accessing-bytes'!
   315 
   352 
   316 bcdByteAt:index
   353 bcdByteAt:index
  2369 ! !
  2406 ! !
  2370 
  2407 
  2371 !UninterpretedBytes class methodsFor:'documentation'!
  2408 !UninterpretedBytes class methodsFor:'documentation'!
  2372 
  2409 
  2373 version
  2410 version
  2374     ^ '$Header: /cvs/stx/stx/libbasic/UninterpretedBytes.st,v 1.60 2005-11-30 22:06:48 stefan Exp $'
  2411     ^ '$Header: /cvs/stx/stx/libbasic/UninterpretedBytes.st,v 1.61 2006-02-21 21:56:59 cg Exp $'
  2375 ! !
  2412 ! !