bit-set - Bit Function
Bit functions process individual bits and return byte-like results. At present, the one bit function is available:
... bit-set( arg ) ...
This function expects an integer numerical value as an argument. The argument is a
numerical expression position of the type i.
If the argument is positive, the function creates a result of the type xstring,
in which the bit has the value 1 in the position specified by the argument. All other bits have the value 0.
If the argument has the value 0, the result is an empty string.
If the argument is negative, the function creates a result of the type xstring,
in which all bits up to and including the position specified by the argument have the value 1, and all bits behind this position have the value 0.
The length of the result is the minimum number of bytes needed to include the set bits.
The function can be used in all positions in which a bit expression can be used, particularly in bit expressions themselves.