Progress
Language Reference


PAGE-SIZE Function

Interfaces
OS
SpeedScript
All
All
Yes

Returns the page size (lines per page) of an output destination. If the output stream is not paged, PAGE-SIZE returns a value of 0.

SYNTAX

PAGE-SIZE [ ( stream ) ] 

stream

The name of an output stream. If you do not name a stream, PAGE-SIZE returns the page size of the default unnamed output stream.

EXAMPLE

This procedure prints a customer report categorized by state. At the end of each state category, it tests to see if there are at least four lines left on the page. The LINE-COUNTER function returns the current line number of output. If that number plus four is greater than the total number of lines on the page (returned by the PAGE-SIZE function), then the procedure skips to a new page. If there are four or more lines left, the procedure skips a line before printing the next customer record.

r-pgsize.p
OUTPUT TO PRINTER.

FOR EACH customer BREAK BY state:
  DISPLAY cust-num name address city state.
  IF LAST-OF(state) THEN DO:
    IF LINE-COUNTER + 4 > PAGE-SIZE
    THEN PAGE.
    ELSE DOWN 1.
  END.
END. 

SEE ALSO

OUTPUT THROUGH Statement, OUTPUT TO Statement


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095