256 Lpos PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

GW-BASIC User's Guide

LPOS Function
Purpose:
To return the current position of the line printer print head within the line printer buffer.

Syntax:
LPOS(x)

Comments:
LPOS does not necessarily give the physical position of the print head.
x is a dummy argument.
If the printer has less than the 132 characters-per-line capability, it may issue internal line feeds
and not inform the computer internal line printer buffer. If this has happened, the value returned
by LPOS(x) may be incorrect. LPOS(x) simply counts the number of printable characters since
the last line feed was issued.

Examples:
The following line causes a carriage return after the 60th character is printed on a line:
100 IF LPOS(X)>60 THEN LPRINT CHR$(13)

file:///C|/Documents%20and%20Settings/Lorenzo/Desktop/GW%20Basic/LPOS.html28/03/2004 21.29.37

You might also like