Cast base types



Cast base types
Smart pascal source code
var i : integer; f : float; b : boolean; BEGIN i := Integer(1); i := i + Integer(i); Writeln(i); f := Float(1.25); f := 0.25 + Float(f); Writeln(f); Writeln(i + Integer(f)); Writeln(Float(i) + f); Writeln(i + f); b := Boolean(true); Writeln(b); Writeln(Boolean(i)); Writeln(Boolean(f)); i := 0; f := 0; Writeln(Boolean(i)); Writeln(Boolean(f)); { ### CONSOLE OUTPUTS ### 2 1.5 4 3.5 3.5 True True True False False }