casting
n. C / Un. the process of changing a piece of data from one type to another. You use this when you want a computer to treat a whole number like a decimal or a piece of text.
n. the conversion of a data entity from one data type to another. This process may be implicit, performed automatically by the compiler, or explicit, requiring a specific operator in the source code.
The programmer used casting to turn the integer into a float.
Without proper casting, the division of two integers might result in an unexpected loss of precision in the final output.
Explicit casting is often necessary when narrowing a data type, as the compiler requires the developer to acknowledge the potential for data loss during the conversion process.
From Middle English castynge, castand, equivalent to cast + -ing.
From Middle English castyng, castinge, equivalent to cast + -ing.
Often used with the preposition 'to' (e.g., 'casting to a string'). In its uncountable sense, it refers to the general concept of type conversion.