We extend the language from Sect. 4.2 with floating-point numbers
as described in 4.2.
a) Extend the type checking functions in Figs. 5.2–5.4 to handle these extensions.
b) We now add implicit conversion of integers to floats to the language, using the
rules: Whenever an operator has one integer argument and one floating-point
argument, the integer is converted to a float. Similarly, if a condition expression
(if-then-else) has one integer branch and one floating-point branch, the
integer branch is converted to floating-point. Extend the type checking functions
from question a) above to handle this.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here