Loading

PACK

lists

The PACK function packs a list of numeric or boolean values according to a specified string format.

Endianness is at bit-level and not byte-level.

  • <Lxx: Little-endian long, xx is optional and is the number of bits which must be less or equal to 64.
  • >Lxx: Big-endian long, xx is optional and is the number of bits which must be less or equal to 64
  • <Uxx: Little-endian unsigned long, xx is optional and is the number of bits which must be less or equal to 64. U and L only differ when unpacking.
  • >Uxx: Big-endian unsigned long, xx is optional and is the number of bits which must be less or equal to 64. U and L only differ when unpacking.
  • <D: Little-endian Double length always equals 64 bits.
  • >D: Big-endian Double length always equals 64 bits.
  • B: Boolean
  • Sxx: Any number of bits set to 1, xx is mandatory.
  • sxx: Any number of bits set to 0, xx is mandatory.
PACK is available since version 1.0.7.

See also

Signatures

Examples

// Create List containing number and boolean values [ 42 41 40 true 42.42 ] '<L<L32>LB<D' PACK '<L<L32>LB<D' UNPACK