
i need to have this Integer or a numerical data type/variable where i will put value with zero in beginning:
example:
int num;
num = 000005;
output: 5
desired output: 000005
i need the 0 in printing and I need it to be integer because i will add value in the 000005
example:
num = 000005 + 1;
output: 6
desired output: 000006
how can i manage to do it in numerical form without removing 0? i cant do STRREM because the number of 0 is not fixed, it can be 2 ZERO or 3 or more ZERO.
please help me. thanks.
*This post is locked for comments
I have the same question (0)As I remember from math classes, such zeros has no meaning, therefore 000005 is 5 as long as we're talking about numbers. And that's the point. You should stop thinking about number and start thinking about text representing formatted numbers.
You can convert number 5 to text 000005 by calling num2Str0(5, 6).