April 2018
Intermediate to advanced
222 pages
5h 28m
English
Explicit conversion is required when a compiler does not perform implicit conversion either because of loss of data or a value containing data not falling within a target data type range. Solidity provides a function for each value type for explicit conversion. Examples of explicit conversion are uint16 conversion to uint8. Data loss is possible in such cases.
The following code listing shows examples for both implicit and explicit conversions: