Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>pcol()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
PCOL()


Syntax:     PCOL()

Purpose:    To determine the current column position of the print head.

Returns:    An integer numeric value.

            PCOL() returns a numeric value representing the last column
            position printed plus one.  For example, if you print a
            string five characters long beginning at column one, a
            subsequent PCOL() returns six.

            An EJECT resets PCOL() to zero.  If you need to reset the
            internal printer column value without performing an EJECT,
            use SETPRC().

Usage:      PCOL() helps keep track of printer column position when you
            want to place text on a line relative to other text on the
            line.  Note, however, that PCOL() may become out of sync
            with the print head when sending control codes to the
            printer.  To make the necessary adjustment, use SETPRC().

Library:    CLIPPER.LIB


----------------------------------- Example --------------------------------

   SET DEVICE TO PRINT
   @ 10, 0 SAY "Hello,"
   @ 10, PCOL() + 1 SAY "how are you?"
   EJECT
   SET DEVICE TO SCREEN

   Results:

   Hello, how are you?


See Also: COL() PROW() ROW() SETPRC()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson