INT < > WORD standard type conversion

 

INT values can be converted to WORD values and vice versa.

INT_TO_WORD conversion

The INT_TO_WORD type conversion function converts an input value of the INT data type into a WORD output value.

Parameter

Data type

Description

IN

INT

Input value

OUT

WORD

Output value

WORD_TO_INT conversion

The WORD_TO_INT type conversion function converts an input value of the WORD data type into an INT output value.

This function performs a signed conversion because the most signifi­cant bit (msb) of the input WORD is interpreted as sign bit and trans­ferred to the most significant bit (msb) of the INT output which is also considered as sign bit.

This way, the input value

Parameter

Data type

Description

IN

WORD

Input value

OUT

INT

Output value