Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Align bytes in the new Rebols

 [1/1] from: oliva::david::seznam::cz at: 22-Apr-2002 10:56


Hello rebol-list, writing my previous post about the bug in the debase, I've recalled one thing I would like to see in the new Rebol versions
>> ;now using >> debase/base "11111100" 2
== #{FC}
>> ;but: >> debase/base "111111" 2
== none
>> ;so what about something like: >> debase/base/align "111111" 2
== #{FC} Of course in the native debase function, so I would not have to use my own byte-align functions as: byte-align: func[bits [string!] /local p][ p: (length? bits) // 8 if p > 0 [insert/dup tail bits #"0" 8 - p] bits ]
>> debase/base byte-align "111111" 2
== #{FC} Oldes