→Integer literal

according to →IEC-standard: →literal which directly represents an →integer value

Examples for integer literals

Description

Examples

integer

-12, 0, 123_4, +986

base 2 (binary literal)

2#1111_1111 (255 decimal), 2#1110_0000 (224 decimal)

base 8 (octal literal)

8#377 (255 decimal), 8#340 (224 decimal)

base 16 (hexadecimal literal)

16#FF or 16#ff (255 decimal), 16#E0 or 16#e0 (224 decimal)

above possibilities as typed literal of type SINT, INT, DINT, LINT, USINT, UINT, UDINT, ULINT
(if the value is positioned within the range of values for the specific type)

INT#-12, INT#16#FF (255 decimal)