Test integerness: Difference between revisions
Content added Content deleted
Line 357: | Line 357: | ||
=={{header|Lua}}== |
=={{header|Lua}}== |
||
<lang lua> |
<lang lua> function IsInt(What) |
||
function IsInt(What) |
|||
if tonumber(What) == What and math.floor(tonumber(What)) == tonumber(What) then |
if tonumber(What) == What and math.floor(tonumber(What)) == tonumber(What) then |
||
return true |
return true |