TInteger.Coerce

Coerces a value to the specified byte count and sign type

Source

Integer.pas (140)

Description

The current value is reinterpreted as a 2's complement value with the specified byte count. The value is either truncated or sign extended as required by the target byte count. Also, the specified sign type is used when forcing values to the target byte count which may result in positive values becoming negative and vice versa. This function replicates the behavior of casting between various fixed precision machine integer values.