Number values can appear as binary numbers, octal numbers, decimal numbers, and hexadecimal numbers. Integer values that are not decimal numbers are represented by the base followed by the number sign (#) in front of the integer constant. The values for the numbers 10...15 in hexadecimal numbers are represented by the letters A...F.
You can include the underscore character within the number.
Examples
14 |
(decimal number) |
2#1001_0011 |
(dual number) |
8#67 |
(octal number) |
16#A |
(hexadecimal number) |
These number values can be of type:
oBYTE
oWORD
oDWORD
oSINT
oUSINT
oINT
oUINT
oDINT
oUDINT
oREAL
oLREAL
Implicit conversions from larger to smaller variable types are not permitted. This means that a DINT variable cannot simply be used as an INT variable. Use the type conversion functions.