DevOutPict

DevOutPict

Writes a PICTURE formatted value to the current device.

Syntax

      DevOutPict( <expression>, <cPicture> [,<cColor>] ) --> NIL

Arguments

<expression> : Any valid expression to write to the device assigned by SET DEVICE command

<cPicture> : A valid PICTURE format string.

<cColor> : A valid color codes string for value to write. Default is current color setting

Returns

DevOutPict() always returns NIL

Description

DevOutPict() is a console function that outputs the value of an expression to the screen or the printer with defined PICTURE and color. Output device depens on current device.

Example

      DevOutPict( CUST->DEBIT, "99,999.99" )

Seealso

@…SAY, Col(), DevOut(), DevPos(), QOut() | QQOut(), Row(), SET DEVICE, SetPos(), Transform()

DevOut

DevOut

Writes a value to the current device

Syntax

      DevOut( <expression>, [<cColor>], [<nRow>, <nCol>] ) --> NIL

Arguments

<expression> : Any valid expression to write to the device assigned by SET DEVICE command

<cColor> : A valid color codes string for value to write. Default is current color setting <nRow> and

<nCol> : Row and column value for device to write <expression>. Defaults is ROW() and COL() if current device is screen and PRow() and PCol() for the printer.

Return

DevOut() returns always NIL

Description

DevOut() is a console function that outputs the value of an expression to the screen or the printer depending on current device.

Example

      // Write a string at upper left corner of screen :

      DevOut( "Here is upper left corner", "W+/R", 0, 0  )

        Equivalent usage :

      @ 0, 0 SAY "Here is upper left corner" COLOR "W+/R"

Seealso

@…SAY, Col(), DevOutPict(), DevPos(), QOut() | QQOut(), Row(), SET DEVICE, SetPos()

EJECT

EJECT

Issue an command to advance the printer to the top of the form

Syntax

      EJECT

Arguments

None

Description

This command issue an form-feed command to the printer. If the printer is not properly hooked up to the computer, an error will not be generated and the command will be ignored.

Once completed, the values of PROW() and PCOL(), the row and column indicators to the printer, will be set to 0. Their values, however, may be manipulated before or after ussuing an EJECT by using the DEVPOS() function.

On compile time this command is translated into __EJECT() function.

Examples

      Use Clientes New
      Set Device to Printer
      CurPos:=0
      While !Eof()
      ? Clientes->nome,Clientes->endereco
      Curpos++
      if Curpos >59
          Curpos:=0
          Eject
      Endif
      Enddo
      Set Device to Screen
      Use

Tests

      See examples

Compliance

Clipper

Platforms

All

Seealso

DEVPOS(), SET PRINTER, PROW(), PCOL()

C5_DEVPOS

 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



CL5 Printing Commands, Statements and Funtions

?/?? :

Display or print one or more values to the console or printer

? | ?? [<exp list>]

@…SAY :

Display or print data at a specified screen or printer row and column

@ <nRow>, <nCol>
   [SAY <exp>
   [PICTURE <cSayPicture>]
   [COLOR <cColorString>]]
   [GET <idVar>
   [PICTURE <cGetPicture>]
   [COLOR <cColorString>]]
   [WHEN <lPreExpression>]
   [RANGE* <dnLower>, <dnUpper>] |
   [VALID <lPostExpression>]

DEVPOS() :

Move the cursor or printhead to a new position depending on the current device

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

DISPLAY :

Display or print records to the console or printer

DISPLAY <exp list>
   [TO PRINTER] [TO FILE <xcFile>]
   [<scope>] [WHILE <lCondition>]
   [FOR <lCondition>] [OFF]

EJECT :

Advance the print head to top of form

EJECT

ISPRINTER() :

Determine whether the LPT1 is ready

ISPRINTER() --> lReady

LABEL FORM :

Display or print labels to the console or printer

LABEL FORM <xcLabel>
   [TO PRINTER] [TO FILE <xcFile>] [NOCONSOLE]
   [<scope>] [WHILE <lCondition>] [FOR <lCondition>]
   [SAMPLE]

LIST :

List or print records to the console or printer

LIST <exp list>
   [TO PRINTER] [TO FILE <xcFile>]
   [<scope>] [WHILE <lCondition>]
   [FOR <lCondition>] [OFF]

OUTSTD() :

Write a list of values to the standard output device

OUTSTD(<exp list>) --> NIL

PCOL() :

Return the current column position of the printhead

PCOL() --> nColumn

PROW() :

Return the current row position of the printhead

PROW() --> nRow

QOUT() :

Display or print a list of expressions to the console or printer

QOUT( [ <exp list> ] ) --> NIL
QQOUT( [ <exp list> ] ) --> NIL

REPORT FORM :

Display or print a report to the console or printer

REPORT FORM <xcReport>
   [TO PRINTER] [TO FILE <xcFile>] [NOCONSOLE]
   [<scope>] [WHILE <lCondition>] [FOR <lCondition>]
   [PLAIN | HEADING <cHeading>] [NOEJECT] [SUMMARY]

SET MARGIN :

Set the page offset for all printed pages

SET MARGIN TO [<nPageOffset>]

SET PRINTER :

Toggle echo of console output to the printer or set the destination of printed output

SET PRINTER on | OFF | <xlToggle>
SET PRINTER TO [<xcDevice> | <xcFile> [ADDITIVE]]

SETPRC() :

Set PROW() and PCOL() values

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

TYPE :

Display or print the contents of a text file

TYPE <xcFile> [TO PRINTER] [TO FILE <xcOutFile>]