- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Add Comment
Admin
As you say, a line like sprintf(NinecharString, "%d%d%d%d%d%d%d%ld",0,0,0,0,0,0,0, Number); will put the 0's first followed by the sign, followed by the magnitude. Still 0000000-1 is the same as -000000001 or -1 (I prefer the last)
Where as sprintf(NinecharString, "%09ld", Number); doesn't do this. ;)
Admin
Fred is a fool.
BTW: camelCase PascalCase