PCOPY statement

Purpose

Copy all text from one console text page (screen) to another.

Syntax

PCOPY source, destination

Remarks

source is an integer value from 1 to 8 (inclusive) that specifies the number of the screen page to be copied.  If either parameter is invalid, the entire operation is ignored.

destination is an integer value in the range 1 to 8 (inclusive) that specifies the number of the screen page to which the source page is copied.  Text and color attributes on the destination page are replaced by the text and color attributes present on the source page.  Use the PAGE statement to alter the active and visible screen pages.

Using two or more console pages is a simple yet very effective technique to vastly speed up the screen display in Windows 95, 98, and ME.  See the example code below.

If redirection is not in effect, STDOUT writes text to page 1, and this can copied to the visible page by using PCOPY 1, destination.

See also

CLS, LOCATE, PAGE, PRINT, STDOUT

Example

FUNCTION PBMAIN

  CLS

  PAGE 2,1

  FOR x& = 65 TO 90

    PRINT STRING$(SCREENX * SCREENY, x&);

    PCOPY 2,1

  NEXT x&

  PAGE 1,1

  WAITKEY$

END FUNCTION