Getting the number of decimal places: Difference between revisions

Added AutoHotkey
m (→‎{{header|REXX}}: added wording to the REXX section header.)
(Added AutoHotkey)
Line 11:
 
 
=={{header|AutoHotkey}}==
<lang AutoHotkey>for i, v in [10, "10", 12.345, "12.345", 12.3450, "12.3450"]
output .= v " has " StrLen(StrSplit(v, ".").2) " decimals.`n"
MsgBox % output</lang>
{{out}}
<pre>10 has 0 decimals.
10 has 0 decimals.
12.345 has 3 decimals.
12.345 has 3 decimals.
12.3450 has 4 decimals.
12.3450 has 4 decimals.</pre>
 
=={{header|Go}}==
299

edits