implicit type conversion

implicit type conversion

(programming)(Or "coercion") The abilty of some compilersto automatically insert type conversion functions where anexpression of one type is used in a context where another typeis expected.

A common example is coercion of integers to reals so thatan expression like sin(1) is compiled as sin(integerToReal(1))where sin is of type Real -> Real.

A coercion is usually performed automatically by the compilerwhereas a cast is an explicit type conversion inserted bythe programmer.

See also subtype.