<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Normally something like this should do the trick (here 3 decimals
and 7 characters for total width):<br>
</p>
program Format_Example;<br>
uses<br>
sysutils;<br>
procedure F( _d: double);<br>
var<br>
S: String;<br>
begin<br>
S:= Format('%7.3f',[_d]);<br>
WriteLn( S);<br>
end;<br>
<br>
begin<br>
F(0.5);<br>
F(2.53);<br>
F(12.5);<br>
end.<br>
<p>---------- Output ------------</p>
<pre> 0.500
2.530
12.500</pre>
<p><br>
</p>
<p><br>
</p>
</body>
</html>