Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

align decimals and negative values

Status
Not open for further replies.

kazilian

Programmer
Nov 14, 2003
30
0
0
US
i can't figure out to align decimal places and negative values, like below.

values to be aligned:
0.0
-99.9
0.0
0.0

how i want the values to appear are:
0.0
-99.9
0.0
0.0

would be nice if i could just have at least one zero to the left of the decimal. i've tried the printf function but its like the specifiers just don't work. any help is appreciated. thanks.

kazilian
Protector of Wazil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top