Determine if a string is numeric: Difference between revisions

(→‎{{header|Lua}}: Marked incorrect given previous editors remarks.)
Line 561:
 
=={{header|Lua}}==
{{incorrect|Lua|When given a non-numeric string can give a runtime error instead of boolean false}}
This will also accept strings like "0xFF" or "314.16e-2" as numbers.
<lang lua>functionif isNumerictonumber(a) ~= nil then
--it's return type(tonumber(a)) == "number"
end</lang>;
</lang>
 
=={{header|Mathematica}}==
Anonymous user