Re: printf fix
- Posted by Robert Craig <rds at ATTCANADA.NET> Apr 26, 2000
- 359 views
Bernie Ryan writes: > The purpose of the sprintf is to format a string. > \t is a formatting character. > All it takes in the interpeter is to expand \t into to 8 spaces. sprintf() should not expand tabs because: 1. How does it know how many spaces equals one tab? 8 is common, but by no means universal. 2. How does it know how many spaces to the next tab stop? It has no concept of the current column position. The tabs will be expanded when and if you choose to print the result of sprintf() on some device that understands tabs. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com