Function U2bin() Foundation

Converts an unsigned numeric value to a 32 bit integer.

Syntax
U2bin( <nInteger> ) --> cBinary
Parameters
<nInteger>
<nInteger> is a numeric expression whose value is converted to binary format. When the value is not an integer, the decimal places are truncated.
Return

The return value of U2bin() is a four character string which contains the numeric value as a 32 bit integer.

Description

U2bin() converts numeric values in the range of 0 to 4294967265 into their binary representation. The function returns a character string with four characters. U2bin() ignores decimal places and only converts integers. The counterpart of U2bin() is Bin2u().

U2bin() is frequently used in connection with the low level file functions. This is sometimes done to allow definition of special or unique file formats, or to provide data compression when integer numeric values are being stored.

Examples
U2bin()
// U2bin() is used just like L2bin(). The difference 
// lies only in the value range and in the ability to 
// handle negative values. 

// See function L2bin() 
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.