DispCount
Return the number of pending DispEnd() requests
Syntax
DispCount() --> nDispCount
Returns
DispCount() returns the number of DispEnd() calls required to restore the original display context.
Description
You can use DispCount() to determine the current display context. Harbour uses display contexts to buffer and to supervise screen output operations.
Each call to DispBegin() defines a new display context. Output to the display context is suppressed until a matching DispEnd() statement executes.
Since you may nest DispBegin() calls, use DispCount() to determine whether there are pending screen refresh requests.
Examples
. This example saves the setting of DispCount(), then releases all pending display contexts before writing to the screen: PROCEDURE ForceDisplay(cExp) LOCAL nSavCount nSavCount := DispCount() // Discard pending display contexts DO WHILE ( DispCount() > 0) DispEnd() ENDDO DispOut(cExp) // "Rewind" the current display context DO WHILE (DispCount() < nSavCount ) DispBegin() ENDDO RETURN
Seealso
DispBegin(), DispEnd()