PGOPT

Sets or retrieves page width and length for printing.

Required Arguments

IOPT — Page attribute option. = (Input)

IOPT

Description of Attribute

1, 1

Page width.

2, 2

Page length.

Negative values of IOPT indicate the setting IPAGE is input. Positive values of IOPT indicate the setting IPAGE is output.

IPAGE — Value of page attribute. = (Input, if IOPT is negative; output, if IOPT is positive.)

IOPT

Description of AttributeSettings forIPAGE

1, 1

Page width (in characters) 10, 11, …

2, 2

Page length (in lines) = 10, 11, …

FORTRAN 90 Interface

Generic: CALL PGOPT (IOPT, IPAGE)

Specific: The specific interface name is PGOPT.

FORTRAN 77 Interface

Single: CALL PGOPT (IOPT, IPAGE)

Description

Routine PGOPT is used to set or retrieve the page width or the page length for routines that perform printing.

Example

The following example illustrates the use of PGOPT to set the page width at 20 characters. Routine WRRRN is then used to print a 3 × 4 matrix A where aij= i + j/10.

 

USE PGOPT_INT

USE WRRRN_INT

 

IMPLICIT NONE

INTEGER ITRING, LDA, NCA, NRA

PARAMETER (ITRING=0, LDA=3, NCA=4, NRA=3)

!

INTEGER I, IOPT, IPAGE, J

REAL A(LDA,NCA)

!

DO 20 I=1, NRA

DO 10 J=1, NCA

A(I,J) = I + J*0.1

10 CONTINUE

20 CONTINUE

! Set page width.

IOPT = -1

IPAGE = 20

CALL PGOPT (IOPT, IPAGE)

! Print the matrix A.

CALL WRRRN ('A', A)

END

Output

 

A

1 2

1 1.100 1.200

2 2.100 2.200

3 3.100 3.200

 

3 4

1 1.300 1.400

2 2.300 2.400

3 3.300 3.400