This option specifies whether to assign an elementary item of binary data to an area of a length in units of words (2, 4, or 8) (BINARY(WORD)) or bytes (1 to 8) (BINARY(BYTE)), which is calculated based on the number of digits. This option can also specify how to treat the high-order-end bit of an unsigned binary item.
Item | Description | |
---|---|---|
Binary data item usage | Specifies how to treat binary items. The default is WORD,MLBON. | |
WORD,MLBON | The area length is in units of words, and the high-order-end bit is treated as a sign symbol. | |
WORD,MLBOFF | The area length is in units of words, and the high-order-end bit is treated as a numerical value. | |
BYTE | The area length is in units of bytes, and the high-order-end bit is treated as a sign symbol. |
Note
BINARY(BYTE) cannot be used in a class definition.
If BINARY(BYTE) is specified, the high order end bit is treated as a numeric value.
Information
The following table shows the relationship between the number of declared digits and the area length.
Number of PIC Digits | Assigned Area Length | ||
---|---|---|---|
Signed | unsigned | BINARY(BYTE) | BINARY(WORD) |
1 - 2 | 1 - 2 | 1 | 2 |
3 - 4 | 3 - 4 | 2 | 2 |
5 - 6 | 5 - 7 | 3 | 4 |
7 - 9 | 8 - 9 | 4 | 4 |
10 - 11 | 10 - 12 | 5 | 8 |
12 - 14 | 13 - 14 | 6 | 8 |
15 - 16 | 15 - 16 | 7 | 8 |
17 - 18 | 17 - 18 | 8 | 8 |