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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Output Formatting

Status
Not open for further replies.

waz2k5

Programmer
Oct 17, 2005
2
CA
Hello.

I am having trouble with formatting my output. The problem is that I am to have data outputed in columns and I cannot get them to line up correctly (i used tab, but that causes some of the data to misaligned). Can anyone give me any adivce or better techniques to use to align such data? Links to other sites would be great too. Thanks
 
Don't use tabs. Use the width and/or precision modifiers with your format specifiers. (I am assuming you are using [tt]printf[/tt].)

Post your attempt, and use [code][/code] tags.
 
To re-iterate what DaveSinkula said - don't use tabs. Not all printers understand them. Sometimes they don't appear at all. They are also programmable on some printers so they may not end up where you think.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top