Formatted numeric output: Difference between revisions

no edit summary
(Replaced module "strfmt" by the more convenient "strformat" which is now provided by the standard library.)
No edit summary
Line 2,087:
{{out}}
<pre>00007.125</pre>
 
=={{header|Vala}}==
<lang Vala>void main() {
double r = 7.125;
print(" %9.3f\n", -r);
print(" %9.3f\n",r);
print(" %-9.3f\n",r);
print(" %09.3f\n",-r);
print(" %09.3f\n",r);
print(" %-09.3f\n",r);
}</lang>
{{out}}
<pre>
-7.125
7.125
7.125
-0007.125
00007.125
7.125
<pre>
 
=={{header|VBA}}==
Anonymous user