This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

print justification of a string

Hi, I'm trying to print a form with a string justified on the right margin of the page

On version 8.0 of rmcobol I used the function P$TextOutRightJ but on rm12 it doesn't work

The string is not costant so I can have "abcdefgh"  "abcd "   "ab " etc, and with the P$TextOutRightJ I had always the last right characters of the string aligned on the right of the position I want

Example  

77  STRING PIC X(55).

call "P$TextOutRightJ" using STRING 19,5 27,60

How can do this ?

Many thanks to all

  • Suggested Answer

    0

    User P$GetTextExtent to determine the size of rectangle occupied by the string, then compute the correct position for P$TextOut.

    Version 8 is very, very old