Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: string::PadRight issues

$
0
0

Hi Randy, I tried compiling and running the following:

      01 str1 string value "hello".

      01 str2 string.

          set str2 to str1::PadRight(10)   *> this works fine

          display str2

          declare pad as binary-long = 10

          set str2 to str1::PadRight(pad)   *> this doesn't work - no trailing spaces in returned string

          display str2

Both of the display statements  showed "hello" followed by 5 spaces.  I think this is correct behaviour as the PadRight adds spaces up to the total length specified by the parameter.


Viewing all articles
Browse latest Browse all 4356