DispOutAt

DispOutAt

Displays a value on the screen

Syntax

      DispOutAt( <nRow>      , ;
                    <nCol>      , ;
                    <expression>, ;
                    [<cColor>]  , ;
                    [<lSetPos>]   ) --> NIL

Arguments

<nRow> : Row number of screen to <expression> write

<nCol> : Column number of screen to <expression> write

<expression> : Any expression to write to the screen.

<cColor> : Color string for display

<lSetPos> : Specifies whether or not to update the screen cursor positions ( Row(), Col() after writing

Return

DispOutAt() returns always NIL.

Description

This function write the value of <expression> at the specified cursor position on the screen, using the color <cColor>, if specified.

Note

DispOutAt() don’t obey SET DEVICE setting and write always to the screen

Example

      DispOutAt( 0, 0, "Here upper left corner of screen", "W+/R" )

         is equvalent to :

         @ 0,0  SAY ""Here upper left corner of screen" COLOR  "W+/G"

Seealso

@ … SAY, Col(), DevOut(), DispBegin(), DispCount(), DispEnd(), DispOutAt(), OutStd(), QOut() | QQOut(), Row(), SetPos()

Advertisements

DispOut

DispOut

Displays a value on the screen

Syntax

      DispOut( <expression>, [<cColor>] ) --> NIL

Arguments

<expression> : Any expression to write to the screen.

<cColor> : Color string for display

Return

DispOut() returns always NIL.

Description

This function write the value of <expression> at the current cursor position on the screen, using the color <cColor>, if specified.

Note

DispOut() don’t obey SET DEVICE setting and write always to the screen

Example

      SetPos( 0, 0 )
         DispOut( "Here upper left corner of screen", "W+/R" )

         is equvalent to :

          @ 0,0  SAY ""Here upper left corner of screen" COLOR  "W+/G"

Seealso

@ … SAY, Col(), DevOut(), DispBegin(), DispCount(), DispEnd(), DispOutAt(), OutStd(), QOut() | QQOut(), Row(), SetPos()

DevPos

DevPos

Moves the cursor or printhead to a row and column coordinate

Syntax

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

Arguments

@ <nRow>, <nCol> : Coordinates for write; screen of printer depending to SET DEVICE setting.

Return

DevPos() returns always NIL.

Description

<nRow>, <nCol> are row and column coordinates and positions the screen cursor or printhead accordingly. Coordinates begin at point 0, 0 which is the upper left corner of the screen, or paper.

IF DEVICE SETted to SCREEN, DevPos() moves the screen cursor to the specified coordinates and updates Row() and Col().

IF DEVICE SETted to PRINTER, DevPos() moves the printhead to the new row and column coordinate and updates PRow() and PCol().

Notes

SetPrc() adjust the internal counters of PRow() and PCol().

When printer output is redirected to a file by SET PRINTER TO command, DevPos() output is recorded in that file.

Seealso

@…SAY, Col(), DevOut(), PCol(), PRow(), QOut() | QQOut(), ROW(), SET DEVICE, SetPos(), SetPrc()

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()

SET PRINTER

SET PRINTER

Toggles the printer and controls the printer device

Syntax

      SET PRINTER on | OFF
      SET PRINTER (<lPrinter>)
      SET PRINTER TO [<cPrinter>] [ADDITIVE]

Arguments

<lPrinter> Logical condition by which to toggle the printer

<cPrinter> A device name or an alternate name

Description

This command can direct all output that is not controlled by the @…SAY command and the DevPos() and DevOut() functions to the printer. If specified, the condition <lPrinter> toggles the printer ON if a logical true (.T.) and OFF if a logical false (.F.). If no argument is specified in the command, the alternate file (if one is open) is closed, or the device is reselected and the PRINTER option is turned OFF.

If a device is specified in <cPrinter>, the output will be directed to that device instead of to the PRINTER. A specified device may be a literal string or a variable, as long as the variable is enclosed in parentheses. For a network, do not use a trailing colon when redirecting to a device.

If an alternate file is specified, <cPrinter> becomes the name of a file that will contain the output. If no file extension is specified an extension of .prn will be defaulted to.

If the ADDITIVE clause is specified, the information will be appended to the end of the specified output file. Otherwise, a new file will be created with the specified name (or an existing file will first be cleared) and the information will then be appended to the file. The default is to create a new file.

Examples

      SET PRINTER ON
      SET PRINTER TO LPT1
      ? 25141251 / 362
      SET PRINTER .F.

Compliance

Clipper

Seealso

SET DEVICE, SET CONSOLE, DevOut(), Set()

DevOutPict()

DEVOUTPICT()

Displays a value to a device using a picture template

Syntax

      DEVOUTPICT( <xExp>, <cPicture>, [<cColorString>] )

Arguments

<xExp> is any valid expression.

<cPicture> is any picture transformation that TRANSFORM() can use.

<cColorString> is an optional string that specifies a screen color to use in place of the default color when the output goes to the screen.

Description

Outputs any expression using a picture transformation instead of using the default transformation for the type of expression.

Examples

      // Output a negative dollar amount using debit notation.
      DEVOUTPICT( -1.25, "@D$ 99,999.99 )

Tests

      @ 3, 1 SAY -1.25 PICTURE "@D$ 99,999.99"
      will display "$(     1.25)" starting on row four, column two of the
      current device (without the double quotation marks, of course).

Compliance

DEVOUTPICT() is mostly CA-Cl*pper compliant. Any differences are due to enhancements in the Harbour TRANSFORM() over CA-Cl*pper.

Files

Library is rtl

Seealso

DEVOUT(), TRANSFORM()

C5_DEVOUT

 DEVOUT()
 Write a value to the current device
------------------------------------------------------------------------------
 Syntax

     DEVOUT(<exp>, [<cColorString>]) --> NIL

 Arguments

     <exp> is the value to display.

     <cColorString> is an optional argument that defines the display
     color of <exp>.  If the current DEVICE setting is SCREEN, the output is
     displayed in the specified color.

     If not specified, <exp> is displayed as the standard color of the
     current system color as defined by SETCOLOR().  <cColorString> is a
     character expression containing the standard color setting.  If you want
     to specify a literal color setting, enclose it in quote marks.

 Returns

     DEVOUT() always returns NIL.

 Description

     DEVOUT() is a full-screen display function that writes the value of a
     single expression to the current device at the current cursor or
     printhead position.  Use DEVOUT() with DEVPOS() in Std.ch to implement
     the @...SAY command.

 Examples

     .  This example shows the relationship between the DEVOUT()
        function and the @...SAY command:

        DEVPOS(10, 10)
        DEVOUT("Hello there", "BG+/B"))
        //
        @ 10, 10 SAY "Hello there" COLOR "BG+/B"

 Files   Library is CLIPPER.LIB.

See Also: COL() DEVPOS() QOUT() ROW() SETPOS()