[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DEVPOS()
 Move the cursor or printhead to a new position depending on the current
 device
------------------------------------------------------------------------------
 Syntax

     DEVPOS(<nRow>, <nCol>) --> NIL

 Arguments

     <nRow> and <nCol> are the new row and column positions of the
     cursor or printhead.

 Returns

     DEVPOS() always returns NIL.

 Description

     DEVPOS() is an environment function that moves the screen or printhead
     depending on the current DEVICE.  If DEVICE is SET to SCREEN, DEVPOS()
     behaves like SETPOS(), moves the cursor to the specified location, and
     updates ROW() and COL() with the new cursor position.

     If DEVICE is SET to PRINTER, DEVPOS() moves the printhead instead.  It
     does this by sending the number of linefeed and/or formfeed characters
     to the printer, and advancing the printhead to the new position.  If the
     current SET MARGIN value is greater than zero, it is added to <nCol>.
     The printhead is then advanced to the specified <nRow> and <nCol>
     position and PROW() and PCOL() are updated.  If either <nRow> or <nCol>
     are less than the current PROW() and PCOL() values, the printhead is
     moved according to the following special rules:

     .  If <nRow> is less than PROW(), an automatic EJECT (CHR(12)) is
        sent to the printer followed by the number of linefeed characters
        (CHR(10)) required to position the printhead on <nRow> of the
        following page.

     .  If <nCol> including the current SET MARGIN value is less than
        PCOL(), a carriage return character (CHR(13)) and the number of space
        characters required to position the printhead at <nCol> are sent to
        the printer.

     To circumvent these rules, use SETPRC() to reset PROW() and PCOL() to
     new values before using DEVPOS().  See the SETPRC() discussion for more
     information.

     If the printer is redirected to a file using the SET PRINTER command,
     DEVPOS() updates the file instead of the printer.

 Files   Library is CLIPPER.LIB.


See Also: @...SAY DEVOUT() PCOL() PROW() SET DEVICE
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson