Logo

Programming-Idioms

History of Idiom 79 > diff from v29 to v30

Edit summary for version 30 by Kng:
[Lua] Preview wasn't correct :(

Version 29

2018-04-03, 08:39:43

Version 30

2018-04-03, 08:40: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 + .0
Code
y = x + .0
Comments bubble
While _+ _.0 makes no difference inside the langauge it will flag it as a fractional number in the C runtime
Comments bubble
While + .0 makes no difference inside the langauge it will flag it as a fractional number in the C runtime
Doc URL
https://www.lua.org/manual/5.3/manual.html#2.1
Doc URL
https://www.lua.org/manual/5.3/manual.html#2.1