Logo

Programming-Idioms

History of Idiom 79 > diff from v7 to v8

Edit summary for version 8 by :

Version 7

2015-09-03, 16:06:22

Version 8

2015-09-03, 21:10:41

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
y = x / 1
Comments bubble
The / operator always returns a float.