Integer Data Type
Integer (INT) variables are 16-bit signed integers from -32768 to 32767.
Access a bit of a bit of an integer variable, array, structure, or the output of a function block instance using this syntax:
MyVar.i
If MyVar is an Integer.
MyVar.i is a Boolean. "i" must be a constant value from 0 to 15.Integer literal expressions represent signed integer (16 bit) values:
from -32768 to 32767
Express integer constants with one of these Bases. Integer constants must begin with a Prefix that identifies the Bases used:
Base | Prefix | Example |
---|---|---|
DECIMAL | (none) | -260 |
HEXADECIMAL | "16#" | 16#FEFC |
OCTAL | "8#" | 8#177374 |
BINARY | "2#" | 2#0101_0101_0101_0101 |
Use the underscore character ('_') to separate groups of digits. This character has no significance other than to improve literal expression readability.
Provide Feedback