DEV Community

Discussion on: Compilers 103 – Semantic Analyzer

Collapse
 
dkassen profile image
Daniel Kassen

I can understand why the integers need casting to double for the addition operation, but why is there a cast on the assignment?

Collapse
 
lefebvre profile image
Paul Lefebvre

Doesn't look like I stated it, but "sum" is treated as an integer variable for this example.