17.07.2013 Views

GWBASIC User's Manual

GWBASIC User's Manual

GWBASIC User's Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

GW-BASIC <strong>User's</strong> Guide<br />

LPOS Function<br />

Purpose:<br />

To return the current position of the line printer print head within the line printer buffer.<br />

Syntax:<br />

LPOS(x)<br />

Comments:<br />

LPOS does not necessarily give the physical position of the print head.<br />

x is a dummy argument.<br />

If the printer has less than the 132 characters-per-line capability, it may issue internal line feeds<br />

and not inform the computer internal line printer buffer. If this has happened, the value returned<br />

by LPOS(x) may be incorrect. LPOS(x) simply counts the number of printable characters since<br />

the last line feed was issued.<br />

Examples:<br />

The following line causes a carriage return after the 60th character is printed on a line:<br />

100 IF LPOS(X)>60 THEN LPRINT CHR$(13)<br />

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

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!