Replace Character with blanks - Help

make

Member
Hi again,

i have the following problem.
I have to create a string, that contains a specified number of blanks.
I tried the follwing :
Def var Custnr as char no-undo.
custnr = "15260 ". /* 14 Blanks after the custnr */

But when i display the string, there are only 6 blanks i can see.

Does anyone know how i can attach the correct number of blanks to the string ?.

Thanks for you help !

Greets Make
 
It is probably the format string used to display the variable that is causing it to be truncated. Try displaying the variable with format "X(19)" (as you have a 5 digit number followed by 14 spaces). Personally I would use the fill function to achieve what you are trying to do:
Code:
custnr = "15260" + fill(" ",14).

make said:
Hi again,

i have the following problem.
I have to create a string, that contains a specified number of blanks.
I tried the follwing :
Def var Custnr as char no-undo.
custnr = "15260 ". /* 14 Blanks after the custnr */

But when i display the string, there are only 6 blanks i can see.

Does anyone know how i can attach the correct number of blanks to the string ?.

Thanks for you help !

Greets Make
 
Back
Top