On 2015-01-10 05:56, Jevgeni Astanovski wrote:
It produces the following:
After conversion A: ! 125678!
What I expected is a number padded with zeros in the left.
I have to check if the receiver program will accept the changed input...

Is the result correct except for the leading zeros? You could loop through the result and replace the leading blanks with zeros. If you find a sign, you'd have to move it to the beginning of the string.

Something like this:

for (i = 0; i < RcvLen; i++)
switch (szOutput[i])
case '-':
szOutput[i] = '0';
szOutput[0] = '-';
case ' ':
szOutput[i] = '0';

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].