HELP: Integer in binary format TYPE: OBJECT SYNTAX: BIN(SIGNED,ENDIAN=SYSTEM/BIG/LITTLE/LOCAL,WIDTH=num/W08/W16/W32/W64)
Writes a binary representation of an integer number, taking an FL5-internal neutral integer representation (produced by the reading counterpart) as input.
This converter supports the most common binary number sizes: 8, 16, 32 and 64 bit. Hence, the output of this converter is either 1, 2, 4 or 8 bytes long.
The desired binary integer width can be specified in two ways:
If the SIGNED flag is set, the binary number is written as a two's complement binary number, which can be negative. Otherwise, the output is an unsigned number. Attempting to convert a negative number to an unsigned binary integer results in a range error.
With the ENDIAN parameter, the endianness (byte order) of the binary number can be specified. By default, the system's endianness is used.
SWITCH: SIGNED - Enable for signed integer [FALSE]
NUMBER: ENDIAN=SYSTEM/BIG/LITTLE/LOCAL - Byte order of the integer [SYSTEM]
SYSTEM - Byte order of the default logical system
BIG - Big endian byte order
LITTLE - Little endian byte order
LOCAL - Byte order of the real physical system
NUMBER: WIDTH=num/W08/W16/W32/W64 - Width of integer in bits [dynamic]
W08 - 8 bit integer
W16 - 16 bit integer
W32 - 32 bit integer
W64 - 64 bit integer