DispBegin

DispBegin

Begin buffering screen output

Syntax

      DispBegin() --> NIL

Returns

DispBegin() always returns NIL.

Description

DispBegin() is a screen function that informs the Harbour display output system that the application is about to perform a series of display operations.

Use DispBegin() with DispEnd() to allow the display output system to buffer display updates. Display output which occurs after DispBegin() but before DispEnd() is allowed to accumulate in internal buffers. When DispEnd() executes, any pending updates appear on the physical display. This is useful in applications where complex screen displays are slow and the appearance of performance is desired.

DispBegin() and DispEnd() calls are optional. They are not required for normal output.

Notes

. Nested calls: DispBegin() calls are nested internally. If several DispBegin() calls occur, buffering is allowed until a corresponding number of DispEnd() calls occur.

. Guaranteed operations: Display updates performed between DispBegin() and DispEnd() are not guaranteed to be buffered–some updates may become visible before DispEnd() is called. However, all updates are guaranteed to be visible after the closing call to DispEnd().

. Terminal operations: Terminal input operations such as INKEY() or READ should not be performed between DispBegin() and DispEnd(). Doing this may cause input or display output to be lost.

. Incompatible operations: Display output by other than the Harbour display functions (e.g., by add-on libraries or by DOS via OUTSTD(), etc.) may not be compatible with DispBegin() and DispEnd(). Output may be lost.

Examples

      .  This example buffers screen output, updates the screen, and
      then displays the buffered screen output:

      DispBegin()            // Start screen buffering
      //
      SETPOS(10, 10)
      DISPOUT("A display update")
      SETPOS(11, 10)
      DISPOUT("Another display update")
      //
      DispEnd()               // Display buffered screen data

Seealso

DispCount(), DispEnd()

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

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