PRINTER.SETTING()

PRINTER.SETTING()

Top  Previous  Next

 

The PRINTER.SETTING() function sets or retrieves a control parameter for a print unit.

 

This function is obsolete. The SETPU statement or GETPU() function should be used in its place.

 

 

Format

 

PRINTER.SETTING(print.unit, param, new.value)

 

where

 

print.unit evaluates to the print unit on which the action is be to performed.

 

paramidentifies the parameter to be changed using the keys shown below.

 

new.valueis the value to be set. A new.value of -1 sets the parameter to its default value. A new.value of -2 returns the current value without changing it.

 

The PRINTER.SETTING() function returns the new (or unchanged) value of the parameter.

 

The parameters which may be set or retrieved by this statement are identified by param numbers. Tokens for these are defined in the KEYS.H include record in the SYSCOM file.

 

Key

Token

Default

Function

1

LPTR$WIDTH

80

Page width

2

LPTR$LINES

66

Lines per page for printer



or  24

Lines per page for display

3

LPTR$TOP.MARGIN

0

Top margin size (lines)

4

LPTR$BOTTOM.MARGIN

0

Bottom margin size (lines)

5

LPTR$LEFT.MARGIN

0

Left margin size (characters)

6 *

LPTR$DATA.LINES


Lines excluding page heading and footing

7 *

LPTR$HEADING.LINES


Heading lines per page

8 *

LPTR$FOOTING.LINES


Footing lines per page

9 *

LPTR$MODE


Printer mode number

10 *

LPTR$NAME


Printer or file name

11

LPTR$FLAGS


Printer mode flags

12 *

LPTR$LINE.NO


Current position on page within data area

13 *

LPTR$PAGE.NO


Current page number

14 *

LPTR$LINES.LEFT


Lines remaining on current page

15

LPTR$COPIES

1

Number of copies to print





Modes marked with an asterisk are query only.

 

The value of lines per page is best set to at least one less than the physical page size to prevent the automatic page throw of most printers after the final line of the page is printed.

 

 

Example

 

WIDTH = PRINTER.SETTING(1, LPTR$WIDTH, -1)

 

This statement sets the page width on print unit 1 to the default value and stores this value in WIDTH.