[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 COL()
 Return the screen cursor column position
------------------------------------------------------------------------------
 Syntax

     COL() --> nCol

 Returns

     COL() returns an integer numeric value.  The range of the return value
     is zero to MAXCOL().

 Description

     COL() is a screen function that returns the current column position of
     the cursor.  The value of COL() changes whenever the cursor position
     changes on the screen.  Both console and full-screen commands can change
     the cursor position.  In addition, COL() is automatically set to zero
     whenever a CLEAR, CLEAR SCREEN, or CLS command is executed.

     Use COL() to position the cursor to a column relative to the current
     column.  It is generally used in combination with ROW() and all
     variations of the @ command.  In particular, use COL() and ROW() to
     create screen position-independent procedures or functions that pass the
     upper-left row and column as parameters.

     If DEVICE is SET TO PRINTER, all the output of @...SAY commands is
     directed to the printer and PROW() and PCOL() are updated instead of
     ROW() and COL().  Use these functions when you need to determine the
     position of the printhead.

 Examples

     .  This example displays a Customer name beginning at column 10.
        The customer's account status is then displayed to the right of the
        last character of the customer name using COL():

     USE Sales NEW

        CLS
        @ 1, 10 SAY "Customer Name: " + TRIM(Customer)
        @ ROW(), COL() + 1 SAY "Account status: " + Status

 Files   Library is CLIPPER.LIB.


See Also: @...CLEAR @...GET @...SAY CLEAR MAXCOL() PCOL()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson