Jump to content

Formatted numeric output: Difference between revisions

Replaced module "strfmt" by the more convenient "strformat" which is now provided by the standard library.
m (→‎{{header|APL}}: Regularize non-standard header markup)
(Replaced module "strfmt" by the more convenient "strformat" which is now provided by the standard library.)
Line 1,426:
 
=={{header|Nim}}==
<lang nim>import strfmtstrformat
const r = 7.125
echo r
echo(( fmt"{-r).format(":9.3f}"))
echo( fmt"{r.format(":9.3f}"))
echo(( fmt"{-r).format(":09.3f}"))
echo( fmt"{r.format(":09.3f}"))</lang>
{{out}}
<pre>7.1250000000000000e+00125
-7.125
7.125
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.