$FUNCNAME$
  DEVPOS()
$CATEGORY$
  TERMINAL/IO
$SUMMARY$
   Move the cursor or printhead to a new position depending on the current
$LANG_RU$
          .
$SYNTAX$
     DEVPOS(<nRow>, <nCol>) --> NIL
$LANG_RU$
     DEVPOS(< >,< >]) -->NIL
$ARGUMENTS$
     <nRow> and <nCol> are the new row and column positions of the
     cursor or printhead.
$LANG_RU$
     < >  < > -     
         .
$RETURNS$
     DEVPOS() always returns NIL.
$LANG_RU$
     DEVPOS()   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.
$LANG_RU$
     DEVPOS() -  ,    
        -   .
       - ,  DEVPOS()   ,  
     SETPOS(),         
     ROW()  COL()      .

         - ,   DEVPOS()
       .     
           / 
     .     ,  
     SET MARGIN,  ,     < >. 
     ,      ,  <
     >  < >,  PROW()  PCOL()  
      .    < >,  < >
     ,    PROW()  PCOL(),  
         :

       < > ,  PROW(),   
           ( CHR(12))  
           (CHR(10))  
            < >  
       .

       < >,   , 
        SET MARGIN ,  PCOL(),    
          (CHR(13)    
              <
       >.

      ,    ,   
     DEVPOS()    SETPRC()  PROW()  PCOL()
      .      SETPRC().

       SET PRINTER      ,
     DEVPOS()   ,   .
$SEEALSO$
  DEVOUT(),PCOL(),PROW(),SETPOS()
$END$
