bit-array>integer ( bit-array -- n ) - Factor Documentation

bit-array>integer ( bit-array -- n )
Bit arrays

Next: ?{


Vocabulary
bit-arrays

Inputs
bit-array a bit-array


Outputs
n an integer


Word description
Outputs the unsigned integer whose binary representation corresponds to the contents of the given bit array.

Notes
The bits of the integer are taken from the bit array in order of ascending significance, least significant bit first. This word is able to return fixnums or bignums of any size; it is not limited by fixnum size or machine word size.

Definition
USING: accessors endian ;

IN: bit-arrays

: bit-array>integer ( bit-array -- n ) underlying>> le> ;

AltStyle によって変換されたページ (->オリジナル) /