Jump to content

Ltoa Command Has Improper Justification

Recommended Posts

FYI. I encountered an annomaly with the ltoa conversion command. The results are always left justified when they should be to the right. The conversion process works correctly, but the justification is incorrect. However when using the itoa command, this works correctly with right justification and padded zeros on the left.

I have no urgent need for a workaround because I rolled my own ltoa conversion command.

compiler version 6.97







It seems that I was mistaken in posting a report stating that the ltoa has a justification bug. My other error was saying that the itoa function performs right justification when in actuality I was using the uitoa function. Sorry for the confusion.


Further investigation reveals that the ltoa, and itoa do not convert to a right justified result. You need to use the sprint32() or the lightweight conversion functions for this. It would have been nice to include this information in the reference manual for us less knowledgeable users. Also adding an ultoa function to the lightweight conversion library would be helpful too should users need it.


I must say sourceboost C does a very nice job in producing good code output, but this forum has got to be the least friendly or helpful on the web for lesser experienced code developers. Not one user replied to either of my posts providing help or offering corrections to my posts. :-(

Edited by Sparky1039
Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...