1

Topic: Problem at summation of string values!

All good morning!
Prompt, please, the answer to the following question.
There is a trace. Value:
k = 0001 - string
I need to receive the following number automatically.
I do so:
p = VAL (k) +1
The answer turns out: 2.000
And I need to receive: 0002
How to me to transform the given line? How correctly to add
Thanks big

2

Re: Problem at summation of string values!

k = ' 0001'
p = chrtran (str (VAL (k) +1, 4), ' ', ' 0 ')

3

Re: Problem at summation of string values!

dima_18;

Transform (k+1, ' @L 9999 ')

4

Re: Problem at summation of string values!

Sergey Sizov wrote:

dima_18;

Transform (k+1, ' @L 9999 ')

Sorry, val () forgot.
Transform (Val (k) +1, ' @L 9999 ')

5

Re: Problem at summation of string values!

Many thanks for the help!