Logo

Programming-Idioms

History of Idiom 79 > diff from v22 to v23

Edit summary for version 23 by programming-idioms.org:
[Pascal] x is granted

Version 22

2016-09-14, 08:30:56

Version 23

2016-10-26, 12:14:43

Idiom #79 Convert integer to floating point number

Declare floating point number y and initialize it with the value of integer x .

Idiom #79 Convert integer to floating point number

Declare floating point number y and initialize it with the value of integer x .

Code
var
  x: integer = 8;
  y: single;
begin
  y := x;
end;
Code
var
  y: single;
begin
  y := x;
end;
Demo URL
https://ideone.com/6NAtXx
Demo URL
https://ideone.com/6NAtXx