Skip to Content
Programming Languages: Concepts and Implementation
book

Programming Languages: Concepts and Implementation

by Saverio Perugini
December 2021
Beginner
840 pages
47h 29m
English
Jones & Bartlett Learning
Content preview from Programming Languages: Concepts and Implementation

7.4 Type Conversion, Coercion, and Casting

Type conversion is the most general of these concepts, in that the other two concepts (i.e., casting and coercion) are instances of conversion. Conversion refers to either implicitly or explicitly changing a value from one data type to another. For instance, converting an integer into a floating-point number is an example of conversion. The storage requirements (e.g., from 32 bits to 64 bits) of a value may change as a result of conversion. Type conversions can be either implicit or explicit.

7.4.1 Type Coercion: Implicit Conversion

Coercion is an implicit conversion in which values can deviate from the type required by an operator or function without warning or error because the appropriate conversions ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Concepts and Semantics of Programming Languages 1

Concepts and Semantics of Programming Languages 1

Therese Hardin, Mathieu Jaume, Francois Pessaux, Veronique Viguie Donzeau-Gouge
Programming C# 10

Programming C# 10

Ian Griffiths

Publisher Resources

ISBN: 9781284222739