The term "forcing" (CAST) refers to the ability to convert one unit of a certain type into another of the specified type. The quantity in question can be indifferently a constant, a variable or the result of a mathematical expression.
Field |
Type |
Description |
---|---|---|
Forcing to I8 |
I8 |
expression/variable/constant |
Forcing to I16 |
I16 |
expression/variable/constant |
Forcing to I32 |
I32 |
expression/variable/constant |
Forcing to U8 |
U8 |
expression/variable/constant |
Forcing to U16 |
U16 |
expression/variable/constant |
Forcing to U32 |
U32 |
expression/variable/constant |
Forcing to REAL |
REAL |
expression/variable/constant |
Forcing to FLOAT |
FLOAT |
expression/variable/constant |
Forcing to INT |
Equivalent to I32 |
|
Forcing to UNSIGNED |
Equivalent to U32 |
|
NOTE: A forcing should be used whenever it is desired to change the normal sequence of conversions implicitly made within a mathematical expression.
Example of use:
|