System Functions
MXC( ) / MXL( ) Return Maximum Column/Line
 
Formats 1. Return Maximum Columns: MXC(chan[,ERR=stmtref])
 
2. Return Maximum Lines: MXL(chan[,ERR=stmtref])
 
Where:
 
chan Channel or logical file number of the file to reference, typically 0 (zero, for the terminal). Use an integer for a device channel (e.g., a printer). Numeric expression.
 
stmtref Program line number or statement label to which to transfer control.
 
Return Integer, zero-based, maximum columns/lines allowed for file/device.
 
Description The MXC( ) function returns an integer reporting the zero-based maximum number of columns allowed for a file or device. MXL( ) returns an integer reporting the
zero-based maximum number of lines allowed for your given file or device. Use these functions as a quick means to determine the size of the current display window on a screen.
Note that the functions MXC( ) and MXL( ) return the maximum available column and line values for the channel based on the current default settings for paper size, printable area, offset, margin, font and pitch.
 
Examples On a terminal where MXC(0)=79 and MXL(0)=24 with LEN(X$)=15:
 
0100 X$="THIS IS A TITLE"
0110 PRINT @(MXC(0)-LEN(X$)+1,0),X$ ! Right-justified on line 1
0200 PRINT @(0,MXL(0)),"F1-Help F4-Quit", ! Left-justified on bottom line
 
The next example returns the maximum column and line values for a given printer
(ASISis the last printer opened on channel 30). The values are zero-based; i.e., the
MXC( ) value returned is 79 for 0-79 = 80 columns:
 
OPEN INPUT (30)"*WINPRT*;ASIS"
C=MXC(30)+1 ! For this printer MXC(30) returns 79, C=80 (0-79) L=MXL(30)+1 ! For this printer MXL(30) returns 55, L=56 (0-55) CLOSE (30)